Access over 20 million homework & study documents

Design a payroll program that prompts the user to enter an employee

Content type
User Generated
Rating
Showing Page:
1/2
Design a payroll program that prompts the user to enter
an employee\'s hourly pay rate and the number of hours
worked. Validate the user\'s input so that only pay rates in
the range of $7.50 through $18.25 and hours in the range
of 0 through 40 are accepted. The program should display
the employee\'s gross pay.
Solution
//using c++
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
double rate,hours, grossPay;
cout<<\"Enter the rates per hours\";
cin>>rate;
cout<<\"\ Enter hours of work\";
cin>>hours;
if(rate>=7.5 && rate<=18.5)
{
if(hours>=0 && hours <=40)
{

Sign up to view the full document!

lock_open Sign Up
Showing Page:
2/2

Sign up to view the full document!

lock_open Sign Up
Unformatted Attachment Preview
Design a payroll program that prompts the user to enter an employee\'s hourly pay rate and the number of hours worked. Validate the user\'s input so that only pay rates in the range of $7.50 through $18.25 and hours in the range of 0 through 40 are accepted. The program should display the employee\'s gross pay. Solution //using c++ #include #include void main() { clrscr(); double rate,hours, grossPay; coutrate; couthours; if(rate>=7.5 && rate=0 && hours ...
Purchase document to see full attachment
User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

Anonymous
I was having a hard time with this subject, and this was a great help.

Studypool
4.7
Trustpilot
4.5
Sitejabber
4.4