Hello how is everyone doing! I just want to make sure that this code was working properly. I tried compling this code on Visual Basic C++ 6.0 and it worked out fine without any errors or warnings. I am not looking for a quick answer. I just want to receive any help with my program below asap. Oh, and I know this is a hmwk problem but I believe this code needs some improvement.
#include <math.h>
#include <iostream.h>
using std::cout;
using std::cin;
int main()
{
gross pay, hourly rate, hrs;
cout << "\n Proceed access towards inputing hours in a weekly basis: "
cin >> hours;
if(hrs >= 40)
cout << "time_and_a_half"
else
cout << "straight time"
switch(number) //calculate the gross pay
{
case 1:
cout << "caluclate the weekly salary"
gross pay = weeks * hourly rate
break;
default:
cout << "\n Please try again! \n";
}
return 0;
}
Objective:
Develop a C++ program that will determine the gross pay for each of several employees. The company pays “straight-time for the first 40 hours worked by each employee and pays “time-and-a-half for all hours worked in excess of 40 hours. You are given the number of hours each employee worked last week and the hourly rate of each employee. Your program should input this information for each employee and should determine and display the employee's gross pay. You should perform the calculation for three employees.