This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include<stdio.h> | |
| int main(void){ | |
| double num1,num2,num3=0.0; | |
| printf("실수를 입력하시오: "); | |
| scanf("%lf", &num1); | |
| printf("실수를 입력하시오: "); | |
| scanf("%lf", &num2); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include<stdio.h> | |
| int main(void){ | |
| float num; | |
| printf("실수를 입력하시오: "); | |
| scanf("%f", &num); | |
| printf("실수형식으로는 %f입니다\n", num); | |
| printf("지수형식으로는 %e입니다\n", num); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include<stdio.h> | |
| int main(void){ | |
| int num1 = 0, num2 = 0; | |
| printf("2개의 정수를 입력하시오: "); | |
| scanf("%d %d", &num1, &num2); | |
| printf("몫: %d 나머지: %d", num1/num2, num1%num2); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include<stdio.h> | |
| void cntPlus(){ | |
| static int count = 0; | |
| printf("덧셈은 총 %d번 실행되었습니다.\n", ++count); | |
| } | |
| void cntMius(){ | |
| static int count = 0; | |
| printf("뺄셈은 총 %d번 실행되었습니다.\n", ++count); | |
| } | |
| void cntMul(){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include<stdio.h> | |
| int main(void){ | |
| char c = 0; | |
| printf("문자를 입력하시오: "); | |
| scanf("%c", &c); | |
| printf("아스키 코드값=%d", c); | |
| return 0; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include<stdio.h> | |
| int main(void){ | |
| char c; | |
| while(c!='q' && c!='Q'){ | |
| printf("문자를 입력하시오: "); | |
| scanf("%c", &c); | |
| getchar(); | |
| if(c=='r'||c=='R'){ | |
| printf("Rectangle\n"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| score=int(input("점수를 입력하세요: ")) | |
| if score>=90: | |
| print("장학생", end=' ') | |
| elif score>=60: | |
| print("합격", end=' ') | |
| else: | |
| print("불합격", end=' ') | |
| print("입니다. ^^") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| n = 1234 | |
| sum = 0 | |
| while n<4568: | |
| if n%444==0: | |
| sum+=n | |
| n+=1 | |
| print(sum) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ss = "IT_CookBook" | |
| '#'.join(ss) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def func(x): | |
| print(x) | |
| pass | |
| func(5) |
OlderNewer