Answer to Question #269551 in C++ for Brixzel

Question #269551

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

1
Expert's answer
2021-11-21T17:33:55-0500
#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);
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS