No older revisions available
No older revisions available
정렬
~cpp #include <fstream> using namespace std; int main() { ifstream fin("input.txt"); ofstream fout("output.txt"); int number[10000]; int i,j,k,temp; for (i=0; i<10000; i++) fin >> number[i]; for (j=0; j<10000; j++) { for (k=0; k<10000; k++) { if (number[j] < number[k]) { temp = number[j]; number[j] = number[k]; number[k] = temp; } } } for (i=0; i<10000; i++) fout << number[i] << endl; return 0; }