-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathChapter02.sln
89 lines (71 loc) · 995 Bytes
/
Chapter02.sln
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
* 산술 연산자
#include <stdio.h>
int main() {
float a = 10, b;
b = a / 3;
printf("%f", b);
return 0;
}
// 3.333333..
#include <stdio.h>
int main() {
int a = 10;
a = a + 3;
printf("%d", a);
return 0;
}
// 13
* 증감 연산자
#include <stdio.h>
int main() {
int a = 10;
a++;
printf("%d", a);
return 0;
}
// 11
#include <stdio.h>
int main() {
int a = 10;
int b = a++;
printf("%d\n", a);
printf("%d", b);
return 0;
}
// 11
// 10
* 비교 연산자
#include <stdio.h>
int main() {
//true : 1
// false : 0
printf("%d", 1 == 1);
return 0;
}
// 1
#include <stdio.h>
int main() {
//true : 1
// false : 0
printf("%d", 1 == 2);
return 0;
}
// 0
#include <stdio.h>
int main() {
//true : 1
// false : 0
// ! not
printf("%d", 1 != 2);
return 0;
}
// 1
#include <stdio.h>
int main() {
//true : 1
// false : 0
// ! not
printf("%d", 1 != 1);
return 0;
}
// 0