난수 발생은 프로그램에서 자주 사용되고 있습니다. C언어의 난수는 rand() 함수를 이용하며, rand() 함수는 0 ~ 32767까지의 난수를 생성합니다. rand(); // 0 ~ 32767까지의 난수 생성 rand() % 100; // 0 ~ 99까지의 난수 생성 rand() % 100 + 1; // 1 ~ 100까지의 난수 생성 실행할 떄마다 매번 다른 수를 생성하기 위해서는 srand 함수로 초기화를 해야 합니다. #include #include srand((unsigned)time(NULL)); #include #include #include void sort(int arr[], int n) { int i, k, temp; for (i = 0; i < n - 1; i++) { for (k =..