having trouble sorting employees pay
Code:
#include <iostream.h>
void main()
{
// declare variables
char nam[30];
float sale;
float total;
int weekpay = 200;
int i = 1;
int hold;
// for loop and input names & determine wages
cout << "Input 10 employees. " << endl;
for (i>=1; i<=10; i++)
{
cout << "Enter name of worker : ";
cin >> nam;
cout << "Enter number of sales : ";
cin >> sale;
total = ((sale * 0.09) + weekpay);
cout << "This employees pay is $ " << total << endl;
}
// sort pay rates
cout << nam << endl;
cin >> hold;
}
#include <iostream.h>
void main()
{
// declare variables
char nam[30];
float sale;
float total;
int weekpay = 200;
int i = 1;
int hold;
// for loop and input names & determine wages
cout << "Input 10 employees. " << endl;
for (i>=1; i<=10; i++)
{
cout << "Enter name of worker : ";
cin >> nam;
cout << "Enter number of sales : ";
cin >> sale;
total = ((sale * 0.09) + weekpay);
cout << "This employees pay is $ " << total << endl;
}
// sort pay rates
cout << nam << endl;
cin >> hold;
}