Lee_assig5

# Lee_assig5 - cout<< "Your raise: "...

This preview shows pages 1–2. Sign up to view the full content.

Sheet1 Page 1 #include <iostream> #include <cmath> using namespace std int main() { int choice cout<<"What would you like to do? choose 1, 2,,3or 4:\n" cout<<"+-------------------------------------------+\n" cout<<"| 1. Using Payroll Program |\n" cout<<"| 2. Taking a quiz |\n" cout<<"| 3. Find Your Letter Grade |\n" cout<<"| 4. Exit |\n" cout<<"+-------------------------------------------+\n" cin>>choice switch (choice){ case 1: if(choice==2){ double salary, raise, Nsalary cout<< "You have chosen the Payroll Program." <<endl cout<< "Input your current salary: " cin>> salary if(salary>=12752) raise= salary/21.9 Nsalary= salary+raise cout<< "Current salary: " <<salary <<endl cout<< "Your raise: " <<raise <<endl cout<< "Your new salary: " <<Nsalary <<endl } else if(salary<12752) raise= salary/17.6 Nsalary= salary+raise cout<< "Current salary: " <<salary <<endl cout<< "Your raise: " <<raise <<endl cout<< "Your new salary: " <<Nsalary <<endl else if(salary<9500) raise= salary/15.2 Nsalary= salary+raise cout<< "Current salary: " <<salary <<endl

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.