Skip to content

Commit 443ad42

Browse files
committedAug 18, 2020
Ders 13
1 parent c5ba813 commit 443ad42

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed
 

‎13_arithmetic_operations/main.go

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
// addition + => 15 + 10 => 15, 10 operand, + operator
2+
// substruction -
3+
// product *
4+
// division /
5+
// remainder %
6+
7+
package main
8+
9+
import "fmt"
10+
11+
func main() {
12+
//x, y := 15, 10
13+
14+
//fmt.Printf("%T, %v\n", x, x)
15+
//fmt.Printf("%T, %v\n", y, y)
16+
//fmt.Printf("%T, %v\n", (x + y), (x + y))
17+
//fmt.Printf("%T, %v\n", (x - y), (x - y))
18+
//fmt.Printf("%T, %v\n", (x * y), (x * y))
19+
//fmt.Printf("%T, %v\n", (9.0 / 3), (9.0 / 3))
20+
//fmt.Printf("%T, %v\n", (x % y), (x % y))
21+
22+
//z := 5.0 / 2 // (2.5)
23+
//fmt.Printf("%T, %v\n", z, z)
24+
25+
// Increment ++, Decrement -- POSTFIX
26+
27+
x := 10
28+
29+
fmt.Println(x)
30+
31+
x = x - 1
32+
33+
fmt.Println(x)
34+
35+
x--
36+
37+
fmt.Println(x)
38+
}

0 commit comments

Comments
 (0)
Please sign in to comment.