various wages calculation
Hi guys.Im really2 new in c++ programming i hope u guys can help me.here`s the question,calculate the wages for the employee`s and display various wages information.the program should accept an employee number,base pay rate per hour,and the number of hours worked.here`s my attempt
Code:
#include <iostream.h>
int empNum; //employee`s number
int payRate; //base pay rate per hour
int hours; //hours worked
float overtime; //amount paid with overtime hours
float netWage; //net wages of employee`s
float aveWage; //average wages paid to the employee`s
float miniWage; //minimun wages paid to the employee`s
float totWage; //total wages paid to the employee`s
int main()
{
cout << "Enter employee`s number:";
cin >> empNum
do
{
cout << "Enter hours worked:";
cin >> hours;
cout << "Enter base pay rate per hour:";
cin >> payRate;
if (hours > 40){
overtime = payRate * 1.5;
}
else
netWage = hours + payRate;
totWage = hours + payRate;
aveWage = totWage/2;
miniWage = smallest netWage;
}while (empNum <= 2);
return 0;
}
seriously i`m new in programming,thanks for any help.