Skip to content

Commit d7a7b9e

Browse files
committed
Ders 19
1 parent d759e85 commit d7a7b9e

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

19_conditional_if_partII/main.go

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
package main
2+
3+
import "fmt"
4+
5+
func main() {
6+
7+
/* x := 10
8+
9+
if x := -5; x < 0 {
10+
fmt.Println(x, "negatif sayıdır")
11+
} else if x%2 == 0 {
12+
fmt.Println(x, "çift sayıdır")
13+
} else {
14+
fmt.Println(x, "tek sayıdır")
15+
}
16+
17+
fmt.Println(x) */
18+
19+
if x := -25; x < 0 {
20+
fmt.Println(x, "negatif sayıdır")
21+
fmt.Println("Benim Adım Arin")
22+
} else {
23+
if x%2 == 0 {
24+
fmt.Println(x, "çift sayıdır")
25+
} else {
26+
fmt.Println(x, "tek sayıdır")
27+
}
28+
}
29+
30+
}

0 commit comments

Comments
 (0)