up & down

    C언어 프로젝트 3 : Up and Down

    C언어 프로젝트 3 : Up and Down

    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 #include #include #include // Up and Down int main(void) { srand(time(NULL)); int num = rand() % 100 + 1; // 1 ~ 100 사이의 숫자 printf("숫자 : %d\n", num); int answer = 0; int chance = 5; while (chance > 0) { printf("남은 기회 %d번\n", chance--); printf("숫자를 맞혀보세요 : %d\n", answer); scanf_s("%d", &answer..