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