📌 난수 생성하기 #include #include #include int main(void) { printf("난수 초기화 이전... \\n"); for (int i = 0; i < 10; i++) { printf("%d", rand() % 10); } printf("\\n\\n난수 초기화 이후... \\n"); srand(time(NULL));//난수 초기화 for (int i = 0; i < 10; i++) { printf("%d", rand() % 10); } return 0; } 난수를 초기화 안하면 계속 같은 수로 나옴. 난수를 제대로 뽑으려면 항상 난수 초기화를 한 후에 rand()함수를 사용해야함. ❗ rand() 함수를 사용하려면 #include #include 이 필요함. 📌 switch..