September 19th, 2013, 11:54 PM
Please, need help with C++ codes..!
Write a C++ program that takes as inputs: an employee name, the hourly rate, and the number of
hours s/he worked in the last week. The program then outputs all entered information in addition
to the salary of the employee for the last week. The steps are as follows:
(1) Write C++ statements that include the header files iostream and string.
(2) Write C++ statements that declare the following variables: name of type string,
hourlyRate of type double, hoursWorked of type int, and salary of type double.
Write a C++ statement that computes the salary of the employee and stores the result in
the variable salary.
(3) Write a C++ statement(s) that output(s) the value of name, hourlyRate, hoursWorked,
and salary with the appropriate text. For example, if the values of name, hourlyRate,
hoursWorked are “Nancy”, 10.5 and 20, respectively, the outputs should be similar to
Hello, Nancy! The last week you worked for 20 hours. Knowing that your hourly rate is
10.5 dollars, your salary for the last week is 210 dollars.
Click Here to Expand Forum to Full Width
This a Codeguru.com survey!