fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. string name;
  6. double salary;
  7. double payinc;
  8.  
  9. for(int loopcount = 0; loopcount <= 2; loopcount++) {
  10. cout << "What is your name? ";
  11. cin >> name;
  12.  
  13. cout << "What is your current Salary? ";
  14. cin >> salary;
  15.  
  16. cout << "What is your pay Increase? ";
  17. cin >> payinc;
  18. cout << endl;
  19.  
  20. double SalaryxInc = salary * payinc;
  21. double NewSal = salary + SalaryxInc;
  22. double monthlysal = NewSal / 12;
  23. double retrosal = (NewSal - salary) * 6/12;
  24.  
  25. cout << name << "'s SALARY INFORMATION" << endl;
  26. cout << "New Salary Monthly Salary Retroactive Pay" << endl;
  27. cout << NewSal << " " << monthlysal << " " << retrosal << endl << endl;
  28.  
  29. cout << "Press Enter to continue...";
  30. }
  31.  
  32. return 0;
  33. }
Success #stdin #stdout 0s 5308KB
stdin
JeanCyr 
80000
.05

AbeLincon
5000
.07

JoeJackson 
125125
.25

stdout
What is your name? What is your current Salary? What is your pay Increase? 
JeanCyr's SALARY INFORMATION
New Salary     Monthly Salary      Retroactive Pay
84000        7000        2000

Press Enter to continue...What is your name? What is your current Salary? What is your pay Increase? 
AbeLincon's SALARY INFORMATION
New Salary     Monthly Salary      Retroactive Pay
5350        445.833        175

Press Enter to continue...What is your name? What is your current Salary? What is your pay Increase? 
JoeJackson's SALARY INFORMATION
New Salary     Monthly Salary      Retroactive Pay
156406        13033.9        15640.6

Press Enter to continue...