#include <iostream>
using namespace std;
int salary(int , int);
int salary(int );
void main()
{
int ratePerHour, totalHours, yearSalary;
cout << "Enter Rate per Hour : ";
cin >>ratePerHour;
//Part 1
cout <<endl << "Enter Total number of Hours per Day : ";
cin >> totalHours;
cout <<endl << "Weekly Salary of hourly-wage employee Is : "<<salary(ratePerHour,totalHours) <<endl <<endl;
//part 2
cout << "Enter Whole year Salary of salaried employee : " ;
cin >> yearSalary;
cout <<endl << "Weekly Salary of salaried employee Is : " <<salary(yearSalary);
int z;
cin>>z;
}
int salary(int h, int r)
{
return (h*r)*7;
}
int salary(int s)
{
int sal;
sal = s /12 ; //to get per month salary
sal = sal /4 ; //to get per week salay
return sal ;
}
using namespace std;
int salary(int , int);
int salary(int );
void main()
{
int ratePerHour, totalHours, yearSalary;
cout << "Enter Rate per Hour : ";
cin >>ratePerHour;
//Part 1
cout <<endl << "Enter Total number of Hours per Day : ";
cin >> totalHours;
cout <<endl << "Weekly Salary of hourly-wage employee Is : "<<salary(ratePerHour,totalHours) <<endl <<endl;
//part 2
cout << "Enter Whole year Salary of salaried employee : " ;
cin >> yearSalary;
cout <<endl << "Weekly Salary of salaried employee Is : " <<salary(yearSalary);
int z;
cin>>z;
}
int salary(int h, int r)
{
return (h*r)*7;
}
int salary(int s)
{
int sal;
sal = s /12 ; //to get per month salary
sal = sal /4 ; //to get per week salay
return sal ;
}
No comments:
Post a Comment