Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a C++ program that will ask a user for a pay rate and number of hours worked, then calculate and display the gross pay

Write a C++ program that will ask a user for a pay rate and number of hours worked, then calculate and display the gross pay based on those values (seem familiar?). The program should contain two functions, printDescription and calculateGrossPay. You may use more functions if you want, but these two are required. printDescription will display a program description (i.e. the "hello" message). This function should take no arguments and should return no results (void). calculateGrossPay will calculate the gross pay. The function should take two double arguments (rate and hours) and return the gross pay (double). Pseudocode for main() might be as follows: Call printDescription to show "hello" message Prompt user for rate and hours Call calculateGrossPay and assign result to grossPay Display results Display "goodbye" message //LIBRARIES (#includes) //PROTOTYPES //MAIN PROGRAM //DEFINITIONS Your style does matters

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

2. What do you believe is at the root of the problem?

Answered: 1 week ago