Make a program that asks the user for the hours worked for the week and the hourly rate. The basic salary is computed as:
Salary = hours worked*hourly rate
#include<iostream>
using namespace std;
int main()
{
double hours;
double hrate;
do
{
cout << "\nPlease, enter hours worked for the week for the woker (0 - exit): ";
cin >> hours;
if (hours == 0)break;
cout << "Please, enter hourly rate for the woker: ";
cin >> hrate;
cout << "The basic salary of worker is " << hrate*hours;
} while (hours != 0);
}
Comments
Leave a comment