Multiple Output help

void main()
{
int ID,hours,pay1,staff,OT,OTH,GP,NP,i,total;
char enter,grade,depname[10],b,B,a,term;

//Welcoming message
cout<<" ------- -- -- ----- ------- ----- --- ---- -- --------"<<endl;
cout<<" Welcome to my Wages program, Press ' and enter to continue"<<endl;
cout<<" ------- -- -- ----- ------- ----- --- ----- -- --------"<<endl;
cin>>enter;
GP=0;

//Start of the Do loop
do
{
//Asking for the user to enter the department name
cout<<"Please enter your Department name\n\n"<<endl;
cin>>depname;

//Asking to enter the no. of staff
cout<<"Please enter the number of staff in your department\n\n"<<endl;
cin>>staff;

//Asking for employee ID
cout<<" Please enter your employee ID\n\n"<<endl;
cin>>ID;

//Asking for grade
cout<<"Please enter your Grade\n\n"<<endl;
cin>>grade;

//Asked to carry on to the next screen
cout<<"Please continue on to the next screen, press ' and enter to do so."<<endl;
cin>>enter;
//clearing the screen
clrscr();
//Enter the amount of hours worked
cout<<"Please enter the amount of hours that you have worked\n\n"<<endl;
cin>>hours;
//Clearing the screen
cout<<"Press Enter and ' to continue"<<endl;
cin>>enter;
clrscr();



//If statement
if ( grade=='A' || grade =='a')

if (hours<=40)


{
//Calculating the normal pay
pay1=hours*10;
OTH=hours-40;

//Outputing the results
cout<<"\n\nID :"<<ID<<endl;
cout<<"\n\nGrade :"<<grade<<endl;
cout<<"\n\nYou have been paid "<<"£"<<pay1<<" For "<<hours<<" hours work"<<endl;
cout<<"\n\nYou have been paid £0 for "<<OTH<<"hours work"<<endl;
cout<<"\n\nGross Pay £"<<pay1<<endl;

}


//Else statement
else

//If statement
if (hours>40)
{
//calculating the over time pay
OTH=hours-40;
OT=OTH*15;
pay1=hours-OTH;
NP=pay1*10;
GP=NP+OT;




//Oututing the results
cout<<"\n\nID : "<<ID<<endl;
cout<<"\n\nGrade : "<<grade<<endl;
cout<<"\n\nDeparment name : "<<depname<<endl;
cout<<"\n\nYou have been paid £ "<<NP<<endl;
cout<<"\n\nYou have been paid £ "<<OT<<" for overtime"<<endl;
cout<<"\n\nGross Pay : "<<"£"<<GP<<endl;
}

//Double if statement
if ( grade=='B' || grade =='b')

if (hours<=40)


{
//Calculating the normal pay
pay1=hours*8;
OTH=hours-40;

//Output the results
cout<<"\n\nID :"<<ID<<endl;
cout<<"\n\nGrade :"<<grade<<endl;
cout<<"\n\nYou have been paid "<<"£"<<pay1<<" For "<<hours<<" hours work"<<endl;
cout<<"\n\nYou have been paid £0 for "<<OTH<<"hours work"<<endl;
cout<<"\n\nGross Pay £"<<pay1<<endl;

}
//Else statement
else

//If statement
if (hours>40)
{
//calculating the over time pay
OTH=hours-40;
OT=OTH*12;
pay1=hours-OTH;
NP=pay1*8;
GP=NP+OT;




//Output the results
cout<<"\n\nID : "<<ID<<endl;
cout<<"\n\nGrade : "<<grade<<endl;
cout<<"\n\nDeparment name : "<<depname<<endl;
cout<<"\n\nYou have been paid £ "<<NP<<endl;
cout<<"\n\nYou have been paid £ "<<OT<<" for overtime"<<endl;
cout<<"\n\nGross Pay : "<<"£"<<GP<<endl;


}

//Double if statement
if ( grade=='c' || grade =='C')

if (hours<=40)


{
//Calculating the normal pay
pay1=hours*6;
OTH=hours-40;

//Output the results
cout<<"\n\nID :"<<ID<<endl;
cout<<"\n\nGrade :"<<grade<<endl;
cout<<"\n\nYou have been paid "<<"£"<<pay1<<" For "<<hours<<" hours work"<<endl;
cout<<"\n\nYou have been paid £0 for "<<OTH<<"hours work"<<endl;
cout<<"\n\nGross Pay £"<<pay1<<endl;

}
//Else statement
else

//If statement
if (hours>40)
{
//calculating the over time pay
OTH=hours-40;
OT=OTH*9;
pay1=hours-OTH;
NP=pay1*6;
GP=NP+OT;




//Output the results
cout<<"\n\nID : "<<ID<<endl;
cout<<"\n\nGrade : "<<grade<<endl;
cout<<"\n\nDeparment name : "<<depname<<endl;
cout<<"\n\nYou have been paid £ "<<NP<<endl;
cout<<"\n\nYou have been paid £ "<<OT<<" for overtime"<<endl;
cout<<"\n\nGross Pay : "<<"£"<<GP<<endl;
}
//Asking if you want to work out another wage
cout<<"To work out another wage enter a Y otherwise enter N"<<endl;
cin>>term;
clrscr();


total += GP ;
}
while (term !='n'&& term !='N');//End of the WHILE loop


//Output the results
cout<<"\n\n----PAY SLIP----"<<endl;
cout<<"\n\nDate : "<<"15/01/10"<<endl;
cout<<"\n\nDeparment name : "<<depname<<endl;
cout<<"\n\nNumber of staff : "<<staff<<endl;
cout<<"\n\nTotal weekly gross pay : £ "<<total<<endl;






//Closing message
cout<<"\n\n Press ' and enter to continue";
cin>>enter;
clrscr();
cout<<"\n\nThanks for using my program";
}

Sorry for the long source post but I don't know how else to display my problem, basically I want the output pay slip to display both of the values entered (the initial value and then the value entered after the loop) is there anyway to do this ? Any help would be much appreciated , sorry for the nooby source btw.
Which loop, which initial value, which value entered after the loop?
so for example If I entered 40 hours grade a then it would times the hours entered multiplied by 10 then it will prompt you to make a decision to decide whether or not you want to work out another wage or end there and get the slip so if I choose to do another one then I enter in 40 hours but grade b so it would times hours by 8. However when I do enter two different grades it only displays the most recently entered data not both. Sorry if the explaination is not clear.
Topic archived. No new replies allowed.