프로그래밍 문제/정올 (134) 썸네일형 리스트형 184 : 문자열1 - 형성평가3 123456789101112131415161718192021222324252627#include #include #pragma warning (disable:4996) int main(){ char string[100]; scanf("%s", string); for (int i = 0; i 182 : 문자열1 - 형성평가1 123456789101112131415161718192021222324#include #include #pragma warning (disable:4996) int main(){ char letter1, letter2; scanf(" %c %c", &letter1, &letter2); // 두 번째 입력값이 더 크다면 if (letter1 601 : 문자열1 - 자가진단9 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 #include #include #pragma warning (disable:4996) int main() { char string[101] = { '\0', }; char temp; scanf("%s", string); // 문자열의 길이만큼 돌려서 출력해야 함 for (int i = 0; i 599 : 문자열1 - 자가진단7 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 #include #include #pragma warning (disable:4996) int main() { char string[100] = { '\0', }; char output[100] = { '\0', }; int count = 0; scanf("%s", string); for (int i = 0; i 598 : 문자열1 - 자가진단6 12345678910111213141516171819202122232425262728#include #include #pragma warning (disable:4996) int main(){ char letter; do { scanf(" %c", &letter); if (('A' 597 : 문자열1 - 자가진단5 12345678910111213141516#include #include #pragma warning (disable:4996) int main(){ char string[2][21]; scanf("%s", string[0]); scanf("%s", string[1]); printf("%d", strlen(string[0]) + strlen(string[1])); return 0;}Colored by Color Scriptercs 596 : 문자열1 - 자가진단4 1234567891011121314151617181920212223242526272829303132333435#include #include #pragma warning (disable:4996) int main(){ char string[100]; int num; scanf("%s", string); scanf("%d", &num); // 예외 사항 처리 // 입력된 문자열의 길이보다 더 큰 값을 입력했을 경우 if (strlen(string) 594 : 문자열1 - 자가진단2 123456789101112131415#include #include #pragma warning (disable:4996) int main(){ char string[100]; scanf("%s", string); printf("%s%s", string, string); return 0;}Colored by Color Scriptercs 595 : 문자열1 - 자가진단3 123456789101112#include #include #pragma warning (disable:4996)int main(){ char name[100] = "Hong Gil Dong"; for (int i = 3; i 593 : 문자열1 - 자가진단1 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 #include #include #pragma warning (disable:4996) int main() { int num; while(1) { printf("ASCII code =? "); scanf("%d", &num); if((num 236 : 함수3 - 형성평가6 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 #include #pragma warning (disable:4996) int calculate(int total, int num) { if ((num / 10) == 0) { // 몫이 없다면, 더 구할 수가 없으므로 return total * num; // 곱 연산 시작 - 엔딩 분기 } if ((num % 10)) { // 나머지가 있다면 return calculate(total* (num % 10), (num/10)); // 나머지를 곱함, 몫을 전달 } else if ((num % 10) == 0) { // 나머지가 0이라면 = (자릿수가 0이라면) r.. 235 : 함수3 - 형성평가5 123456789101112131415161718192021222324252627282930313233#include #pragma warning (disable:4996) int count = 0; void divide(int num){ if (num == 1) { // num이 1이라면 카운트를 출력하고 종료 printf("%d", count); return; } else if ((num % 2) == 0) { // 짝수라면 count++; divide(num / 2); } else if ((num % 2) == 1) { // 홀수라면 count++; divide(num / 3); } } int main() { int num; scanf("%d", &num); divide(num); return 0;.. 이전 1 ··· 8 9 10 11 12 다음