프로그래밍 문제 (151) 썸네일형 리스트형 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;.. 234 : 함수3 - 형성평가4 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 #include #pragma warning (disable:4996) void sequence(int before_n2, int before_n1, int limit) { // 현재 출력해야 할 값 연산 int cur_n = (before_n2 * before_n1) % 100; before_n2 = before_n1; // 값을 하나씩 미룸 before_n1 = cur_n; if (limit == 3) { // 3부터 시작하므로, 3을 입력하면 3번째 값 출력하고 종료 printf("%d ", cur.. 233 : 함수3 - 형성평가3 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 #include #pragma warning (disable:4996) #define ARR_MAX 11 int arr[ARR_MAX]; // 눈금을 담을 배열 int index = 1; // 배열의 인덱스 void dice(int level, int sum) { int temp = 0; for (int i = 1; i 이전 1 ··· 10 11 12 13 다음