#include <iostream>
#include <fstream>
using namespace std;
int main()
{
float salary[500], t;
int i, j, m;
ifstream readFile("salary.txt",ios::in);
if(! readFile)
{
cerr << "open error!" << endl;
exit(1);
}
for(m = 0; m < 500; m++)
{
readFile >> salary[m];
}
readFile.close();
for(i = 0; i < 500; i++)
{
for(j = 0; j < 500 - i; j++)
if(salary[j] < salary[j + 1])
{
t = salary[j];
salary[j] = salary[j + 1];
salary[j + 1] = t;
}
}
ofstream writeFile("orderrd_salary.txt", ios::out);
for(int n = 1; n < 500; n++)
{
cout << salary[n] + 100 << endl;
writeFile << salary[n] + 100<< endl;
}
writeFile.close();
system("pause");
return 0;
}