a regular employee earns $32,500 nnualy . write a program that determines and display what the amount of his gross pay will be for each pay peroid if he is paid twice a month (24 pay checks for year) and if he is paid by weekly (26 checks for year).
int main()
{
int a=32500;
int b=24;
int c=26;
std::cout << "Gross pay for twice a month is " << a/b << std::endl;
std::cout << "Gross pay for biweekly is " << a/c << std::endl;
}
/* Write your question here.
a regular employee earns $32,500 nnualy . write a program that determines and display what the amount of his gross pay will be for each pay peroid if he is paid twice a month (24 pay checks for year) and if he is paid by weekly (26 checks for year).
*/
#include <iostream>
usingnamespace std;
double twiceMonthly(int revenue){
double monthlyCheck = (revenue / 24.0);
return monthlyCheck;
}
double biWeekly(int revenue){
double biWeeklyCheck = (revenue / 26.0);
return biWeeklyCheck;
}
int main(){
// a regular employee earns $32,500 annualy.
int revenue = 32500;
cout << "Total annaul revenue: $" << revenue << endl;
// display amount of gross pay of twice monthly (24 pay checks) & bi weekly (26 checks)
cout << "Gross pay at twice a month rate: $" << twiceMonthly(revenue) << endl;
cout << "Gross pay at by weekyl rate: $" << biWeekly(revenue) << endl;
return 0;
}