this might work for ya ...
Code:#include "stdafx.h" #include <iostream> using namespace std ; int hours_worked; float pay_rate; float wages; int _tmain(int argc, _TCHAR* argv[]) { // 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 ; wages = hours_worked * pay_rate; cout << endl ; cout << "The weekly wages are: $" << wages << endl ; return 0; }




Reply With Quote