Question: Programming Exercise #ex2_1 1. Create a new text file named ex2_1.cpp with the following two lines. Be sure to replace the string Your FullName with
Programming Exercise #ex2_1 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: Your Full Name */ 2. Next to the above two lines, write a CH+ 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 value of work 3. One way to calculate the productivity is expressed by the following formula: productivity 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. total hours worked 1600 4. Write a C++ code to perform the calculation based on the above formula. Then, display the output on the screen. 70 Penn P. Wu, PhD - CH Programming Developer Command Prompt for FRESCI1230x21 Enter the total value of works 95042 Enter the total hours of worked: 1657 productivity - $57.72 cscf123x2_1 Enter the total value of work: 175269 Enter the total hours of worked: 25436 productivity - $6.89859
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
