# data[].attributes.body
#while

i=1

while (i<=5):

name=input('%d) What is your name: '%i)

hours=int(input('Hours Worked: '))

if (hours>50):

pay=((hours-50)*1.5+50)*25

else:

pay=hours*25

epf=pay*0.11

grosspay=pay-epf

i+=1

print('Pay: RM%.2f\n'%pay)

print('EPF: RM%.2f\n'%epf)

print('Grosspay: RM%.2f\n'%grosspay)

#for

for i in range(1,6):

name=input('%d) What is your name: '%i)

hours=int(input('Hours Worked: '))

if (hours>50):

pay=((hours-50)*1.5+50)*25

else:

pay=hours*25

epf=pay*0.11

grosspay=pay-epf

i+=1

print('Pay: RM%.2f\n'%pay)

print('EPF: RM%.2f\n'%epf)

print('Grosspay: RM%.2f\n'%grosspay)

# data[].attributes.body
#include <iostream>
#include <string>
using namespace std;

int main()
{
int hours,i ;
string name;
float pay, salary, epf, grosspay;

for (i = 1;i <= 5; i++)
{
cout << "\nThe hourly pay rate is RM 25.00\n";
cout << "\nPlease enter your name: ";
cin >> name;
cout << "\nEnter how many hours worked for this week: ";
cin >> hours;

if (hours > 50)
{
pay = 25.00 * (50 + 1.5 * (hours - 50));
cout << "\nPay = " << pay << endl;
}
else
{
pay = (25.00 * hours);
cout << "\nIncome payment this week: RM" << pay << endl;
}

epf = 0.11 * pay;

grosspay = pay - epf;
cout << "\nHours worked: " << hours << endl;
cout << "\nYour EPF: RM " << epf << endl;
cout << "\nYour grosspay: RM " << grosspay << endl << endl;

}

return 0;
}

# data[].attributes.body
#include <iostream>
#include <iomanip>
#include <cmath>

using namespace std;

int main()
{
int hours;
char name[20];
float pay,epf,grosspay;

cout<<"The hourly pay rate is RM25.00. ";

int i=1;
while(i<=5)
{
cout<<"Please enter your name: ";
cin>>name;
cout<<"Enter how many hours worked this week:";
cin>>hours;

if (hours>50)
{
cout<<"You have worked extra "<<hours - 50<<"hours."<<endl;
pay = 25.00 * (50 + 1.5 * (hours-50));
cout<<fixed<<setprecision(2)<<"Income payment this week: RM"<<pay<<endl;
epf = 0.11 * pay;
cout<<fixed<<showpoint;
cout<<fixed<<setprecision(2)<<"Your EPF: RM"<<epf<<endl;
grosspay = pay - epf;
cout<<fixed<<setprecision(2)<<"Your grosspay: RM"<<grosspay<<endl;
}

else
{
pay = 25.00 * hours;
cout<<fixed<<setprecision(2)<<"Income payment this week: RM"<<pay<<endl;
epf = 0.11 * pay;
cout<<fixed<<setprecision(2)<<"Your EPF: RM"<<epf<<endl;
grosspay = pay - epf;
cout<<fixed<<setprecision(2)<<"Your grosspay: RM"<<grosspay<<endl;
}
i=i+1;
}
return 0;
}

# data[].attributes.body
#include <iostream>
#include <iomanip>

using namespace std;

int main()
{
char name [20];
float hours,pay,epf,grosspay;
int i = 1;

do
{
cout<<"Please enter your name : ";
cin>>name;
cout<<"Enter how many hours worked this week: ";
cin>>hours;

if (hours>50)
{
pay = 25.00 * (50 + 1.5 * (hours - 50));
epf = pay * 0.11;
grosspay = pay - epf;
}
else
{
pay = 25.00 * hours;
epf = pay * 0.11;
grosspay = pay - epf;
}

cout<<fixed<<showpoint;
cout<<setprecision(2)<<"Your pay for "<<hours<<" hours is : RM"<<pay<<endl;
cout<<setprecision(2)<<"Your EPF: RM"<<epf<<endl;
cout<<setprecision(2)<<"Your grosspay: RM"<<grosspay<<endl;
cout<<"\n";

i = i+1;
}while (i<=5);

return 0;
}