Contents
3.1.2. ¶
-
- Compile?
- 기계?
- C그 Java C++
-> 1110010 (AND) ()
C (high level )
"hello"
#include ----- => source=code
coding
"hello"
#include ----- => source=code
coding
3.2.4. 과 ¶
- 과 거 . ㅋㅋㅋ
1.int a=10,b=12,temp; a 값 b 고, b 값 a 그 .
//!! #include <stdio.h> int main(){ int a=10,b=12,temp; // printf("%d %d",a,b); // 값 12 10 겠? return 0;//게 경 . }
2. , int, float,char,double 각 .( ~
)
3. 그 각고, 그 그 .
.png)
3. 그 각고, 그 그 .
#include <stdio.h> int main(){ int a=21,b=2,c; a=a*b; c=a+b; printf(", . 1+3=%d",c+b); return 0; }
4.Compile 까? 각 기 .
3.3.3. ¶
- %d, %c, , , if-else,scanf,printf, else if
#include <stdio.h> int main(){ char a='d'; int b; char e=a; printf("%c",e); return 0; }까?
- 기
- 180기 , . 그 164 경, 171 경, 187 권 그 .
- 180기 , . 그 164 경, 171 경, 187 권 그 .
#include <stdio.h> int main(){ int height; scanf("%d",&height); if(164==height) printf("경"); else if(171==height) printf("경"); else if(187==height) printf("권"); .... return 0; }
#include <stdio.h> int main() { int a=164, height; scanf("%d",&height); if(164==height) { printf(" 경"); } if (171==height){ printf("경"); }else if(187==height){ printf("권"); }else if(height<180){ printf(""); }else{ printf(""); } return 0; }
3.3.4. 과 ¶
과 1 2
1.간 (, %d, %c, , if-else, scanf, printf, else if, ==, =, +=,>) . . 각각 고, 간 각 . A4 거~.
2-2.char printf("%c%c%c%c%c",????); Woori 그 . jereneal20@.com .
1.간 (, %d, %c, , if-else, scanf, printf, else if, ==, =, +=,>) . . 각각 고, 간 각 . A4 거~.
- 고, . 경 jereneal20@.com .
2-2.char printf("%c%c%c%c%c",????); Woori 그 . jereneal20@.com .
- 게 꼭 . 간게 고 .^^
- 과 간 까 ~
3.3.5. 기 ¶
- 6p . if else if, temp, scanf, printf . scanf 개 갈 & 기 결. if . 기 . 기게 겠... 기게 기 ㅎㅎㅎㅎㅎ -
- 과 printf scanf temp if else if 각각 . 갈 , 거고 각. c 규 . 고 각고, 규 겠 ㅋㅋ -권
- 게 . 그 각 ㅋㅋ ..ㅋㅋ 그고 꾸 기 . 과 구 ..... 겠 ㅋㅋ -경
3.4.4. ¶
- : %d
- 개
- ------ row
- \n
- ------ row
- Linux - Ubuntu
- cd change directory
- ls
- gcc
- cd change directory
#include <stdio.h> int main(){ int a=2; a+=3; // a=a+3; return 0; }
- (2!=3) =>
- ASCII Code => char
#include <stdio.h> int main(){ char a='a',c='d'; c=a+1; printf("%c",c); return 0; }그 값?
switch(height){ case 171: printf("경"); case 187: printf(""); default: printf(" "); }
- a++;, ++a;
for(i=0;i<=100;i++){ for(j=0;j<100;j++) printf("%d\n",i); }
- for -> 1243 243 243
- Linux, switch, gcc, while, for.
3.4.5. 과 ¶
- 과 4 8 까 .
- jereneal20@.com ~
- jereneal20@.com ~
- 공과 1: 구구 그 기.
1 2 3 4 5 6 7 8 9 10 2 4 6 8 10 12 14 16 18 20 3 6 9 12 15 18 21 24 27 30 . . .
- 공과 2: C 간 과 기.
- 경 과 : 고 기 그 기.
- (5 5-4-3-2-1개 , 4 4-3-2-1 .)
- 게 고 과! ㅋㅋ
- (5 5-4-3-2-1개 , 4 4-3-2-1 .)
***** **** *** ** *
- , 과 : while for 기.
1112111 1112111 1112111 3333333 1112111 1112111 1112111
- 과 .
3.4.6. 기 ¶
- - switch while . while ㅠ_ㅠ 과 ... ... c공 겠. switch case ... ... 거 if 거까 switch .
- 경 - switch, while, for . ㅠㅠ... 게 * 고 고 .....ㅋㅋ 그고 꾸 ..
- 권 - switch, while, for . 겠 ㅠㅠ 게 ㅠㅠ ; 겠. .. ..
3.6.3. ¶
- . scope ( , ), 개.
- .
- .
#include <stdio.h> int function(int fa,int fb); int funct(int fa,int fb); int main() { int a,j,b; a=10; b=12; for(j=0;j<5;j++){ a+=function(a,b); } } int funct(int fa,int fb) { return fa+1; } int function(int fa,int fb) { fa=funct(fa,fb); printf("%d %d\n",fa,fb); return 0; }
3.7.2. IceBreaking ¶
- IceBreaking -_-;;
3.7.3. ¶
- 2010 교 고, .
- 교 ppt .
- int main( void ) - main indicate that main is a program building block called a function
- printf,\n,\t,\a,\\,\",return 0; in main,compile, link, scanf, int ==> variables, c=a+b;, %d, + => operator, %,if, ==, !=, >=, else, sequential execution, for, ab:c, total variable, counter variable, garbage value, (int), , ++a a++ pre/post in/decrement operator, math.h // pow,%21.2d, case switch, break, continue, logical operator || && ! .
- int main( void ) - main indicate that main is a program building block called a function
3.8.2. IceBreaking ¶
- ?!