U E D R , A S I H C RSS

정렬/강희경

~cpp 
#include <fstream> 
using namespace std; 
 
int main() 
{ 
        ifstream fin("input.txt"); 
        ofstream fout("output.txt"); 
 
        int array[10000]; 
        for(int i = 0; i<10000;i++)
		{
			fin >> array[i] ;
		}
		int temp;
		for(int j = 0; j < 10000; j++)
		{
			for(int k = j+1; k < 10000; k++)
			{
				if(array[j] > array[k])
				{
					temp = array[j];
					array[j] = array[k];
					array[k] = temp;
				}
			}
			fout<<array[j];
		    fout<<endl;

		}

        return 0; 
} 

Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2021-02-07 05:30:45
Processing time 0.0115 sec