Hi,
I have some errors when debugging the following code in C++. Does anyone have a suggestion on the correct code to use?
Thanks
#include <iostream>
using namespace std ;
int main()
{
int hours_worked ;
float pay_rate ;
float 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
I have some errors when debugging the following code in C++. Does anyone have a suggestion on the correct code to use?
Thanks
#include <iostream>
using namespace std ;
int main()
{
int hours_worked ;
float pay_rate ;
float 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