I just started a programming class, and I have knowledge on prgramming. Please can some one help me with this programming.
Generally, a test plan should accompany any code you submit. The plan contains data and strategies you have used to test your code. We will have more to say about test plans in module 5. For the present, use the following information to decide if your code is working correctly:
if you specify 40 for the number of hours worked, and 12.75 as the pay-rate, then the total wages should be $510
Code Template
Use the template given below. In creating your program, carefully copy the template exactly as given, maintaining all the blank lines, spaces, and general alignment. Then replace the areas that have been highlighted in yellow with your code. Do not change any of the other code.
/*****************************************************/
/* File: give name of your file with the source code */
/* */
/* Created by: give your name */
/* Date: give the date */
/* */
/* Program to compute the weekly wages */
/* */
/* Inputs: (keyboard) */
/* 1. No. of hours worked during a week (integer) */
/* 2. Pay rate (dollars per hour) (float) */
/* */
/* Output: */
/* weekly wages displayed on screen as a float */
/* */
/* Algorithm: wages = hours worked * pay rate */
/* */
/****************************************************/
#include <iostream>
using namespace std ;
int main()
{
declare hours_worked as an integer ;//No. of hrs worked during week
declare pay_rate as a float ; //Pay rate: dollars per hour
declare wages as a float ; //Weekly wages
// read in the hours worked
cout << endl ;
cout << "Number of hours worked during"
<< " the week (integer) = " ;
cin >> hours_worked ;
// read in the pay rate
cout << "Hourly pay rate (specify two digits "
<< "after the decimal point) = " ;
cin >> pay_rate ;
// compute wages
write assignment statement to compute wages ;
// display the result
cout << endl ;
cout << "The weekly wages are: $" << wages << endl ;
return (0); // terminate with success
Thank you.