그 ¶
~cpp
#include <fstream>
using namespace std;
const int Arsize=10000;
int main()
{
ifstream fin("UnsortedData.txt"); //txt
ofstream fout("output.txt"); // txt 값 .
int sort[Arsize];
for(int i=0;i<Arsize;i++)
fin >> sort[i];//
for(int k=0; k<Arsize; k++)
{
for(int j=0; j<Arsize;j++)
{
int temp;
if(sort[k] > sort[j])//기교
{
temp=sort[k];
sort[k]=sort[j];
sort[j]=temp;
}
}
}
for(int d=0; d<Arsize; d++)
{
fout << sort[d] << endl;
}
return 0;
}










