// Solution of Assignment 3.

#include <iostream>
#include <string>
using namespace std;
int main()
{
	float hours_worked, salary;

	cout << "Enter the weekly hours worked: ";
	cin >> hours_worked;

	if (hours_worked >= 0)
	{
		if (hours_worked <= 20)
			salary = hours_worked * 6;
		else
			salary = 120 + (hours_worked - 20) * 8.5;

		cout << "\n\n\tThe weekly salary is: "
			<< salary << ".\n\n";
	}
	else
		cout << "\a\n\tThe input must be nonnegative.\n\n";

	system("pause");

	return 0;

}

