Maybe this?>>
Code:
#include <iomanip>
#include <string>
#include <iostream>
using namespace std;
int main ()
{
int yearsofservice,yearhired,oldsalary,code;
int numfaculty,totsalaryincrease,avgsalaryincrease;
int facultycounter=0;
double newsalary;
double salaryincrease;
const int YEAR=2007;
string fname;
string lname;
cout<<"How many faculty members are you inputting?:";
cin>>numfaculty;
while(facultycounter < numfaculty)
{ //begins loop
cout<<"Input the members name:";
cin>>fname>>lname;
cout<<"Input the members year hired:";
cin>>yearhired;
cout<<"Input the members old salary:";
cin>>oldsalary;
cout<<"Input the members code:";
cin>>code;
switch (code)
{ //start of switch
case 1: salaryincrease=oldsalary*(.03);
break;
case 2: salaryincrease=oldsalary*(.05);
break;
case 3: salaryincrease=oldsalary*(.08);
break;
default: cout<<"You did not type any code in!!!";
} // end of swicth
newsalary=salaryincrease+oldsalary;
yearsofservice=YEAR-yearhired;
if(facultycounter < numfaculty)
{// begins if
cout<<"Robert Dobler\n\n\n";
cout<<setw(57)<<"FAILNONE UNIVERSITY FACULTY SALARY REPORT FOR "<<YEAR<<endl<<endl<<endl<<endl;
cout<<setw(10)<<"FACULTY"<<setw(17)<<"YEARS OF"<<setw(11)<<"OLD"<<setw(11)<<"NEW"<<setw(17)<<"SALARY"<<endl;
cout<<setw(8)<<"NAME"<<setw(19)<<"SERVICE"<<setw(13)<<"SALARY"<<setw(11)<<"SALARY"<<setw(16)<<"INCREASE"<<endl;
cout<<setw(10)<<"-------"<<setw(17)<<"--------"<<setw(13)<<"------"<<setw(11)<<"------"<<setw(16)<<"--------"<<endl;
cout<<fname<<lname<<setw(12)<<yearsofservice<<setw(16)<<oldsalary<<setw(11)<<newsalary<<setw(14)<<salaryincrease<<endl;
++facultycounter;
} // ends if
} // ends loop
else
return 0;
}
Maybe you could use a loop like that.