Question: 1. Create a new text file named ex2_1.cpp with the following two lines. Be sure to replace the string Your FullName with your real

1. Create a new text file named "ex2_1.cpp" with the following two

 

1. Create a new text file named "ex2_1.cpp" with the following two lines. Be sure to replace the string "Your FullName" with your real full name. /*Filename: ex2_1.cpp Student: YourFullName */ 2. Next to the above two lines, write a C++ program that will declare two variables of proper data types: "totalValue" and "totalHour". Then, ask users to enter a value to be stored in the "totalValue" variable and a value to be stored in the "totalHour" variable. [Be sure to choose the proper data type(s) for the "totalValue" and "totalHour" variables] total hours worked" 3. One way to calculate the productivity is expressed by the following formula: productivity = total value of work For example, the productivity of a nation is measured using GDP per worker of $90,000 and average annual hours worked of 1600. The value is computed by: productivity = $90,000 = $56.25 per hour. 1600 4. Write a C++ code to perform the calculation based on the above formula. Then, display the output on the screen.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!