subject

Create a console application, no user defined class is necessary for this program, all code is to be implemented in main.

2. declare variables that will hold an hourly wage, number of hours worked.

3. prompt the user to enter values for hourly rate and hours worked. (don't forget to convert the text console inputs)

4. compute the gross weekly pay calculated as hours times rate for the the first 40 hours times 1.5 times the rate for any hours over the first 40 hours.

5. compute the net pay as the gross pay minus withholding; withholding is calculated as 28 percent of gross pay if gross pay is greater than $1000 21 percent of gross pay if gross pay is greater than $600 and less than or equal to $1000 10 percent of gross pay if gross pay is less than or equal to $600

6. display the input/output as something like the following: enter hourly pay rate 30.00 enter hours worked 50 gross pay is $1650 and net pay is $1188 press any key to continue . .

this will require some analysis of the problem before coding is accomplished. it will require an if-else statement to compute gross hours depending on whether hours is 40 or greater than 40. it will require a second if-else statement with a nested if-else to set the withholding rate dependent on the percentage rates listed in requirement 5 above.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 06:00
Which of the following is a way that advancements in technology improve humans' ability to measure air quality and protect human health? a. air quality data gathered by new instruments can be used to reduce exposure to pollutants. b. new technologies enable natural and human-made pollution sources to be located and monitored. c. air quality data gathered by new instruments can be used to predict trends in pollution over time. d. new technologies allow governments to make informed decisions about the regulation of pollution. (choose more than one)
Answers: 2
question
Computers and Technology, 22.06.2019 22:50
Assume the existence of a bankaccount class. define a derived class, savingsaccount that contains two instance variables: the first a double, named interestrate, and the second an integer named interesttype. the value of the interesttype variable can be 1 for simple interest and 2 for compound interest. there is also a constructor that accepts two parameters: a double that is used to initialize the interestrate variable, and a string that you may assume will contain either "simple", or "compound", and which should be used to initialize the interesttype variable appropriately. there should also be a pair of functions getinterestrate and getinteresttype that return the values of the corresponding data members (as double and int respectively).
Answers: 2
question
Computers and Technology, 23.06.2019 00:40
Consider the following statements: struct nametype{string first; string last; }; struct coursetype{string name; int callnum; int credits; char grade; }; struct studenttype{nametype name; double gpa; coursetype course; }; studenttype student; studenttype classlist[100]; coursetype course; nametype name; mark the following statements as valid or invalid. if a statement is invalid, explain why.a.) student.course.callnum = "csc230"; b.) cin > > student.name; c.) classlist[0] = name; d.) classlist[1].gpa = 3.45; e.) name = classlist[15].name; f.) student.name = name; g.) cout < < classlist[10] < < endl; h.) for (int j = 0; j < 100; j++)classlist[j].name = name; i.) classlist.course.credits = 3; j.) course = studenttype.course;
Answers: 1
question
Computers and Technology, 23.06.2019 02:30
Three out of five seniors remain undecided about a college major at the end of their senior year.
Answers: 3
You know the right answer?
Create a console application, no user defined class is necessary for this program, all code is to be...
Questions
Questions on the website: 13722361