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

#include <iomanip>

#include <cmath>

using namespace std;

int main()

{

char name [20];

int i=1;

float hours;

float pay;

float epf;

float grosspay;

do

{

cout<<"Enter your name: ";

cin.ignore();

cin.getline(name,20);

cout<<"Enter your work hours:";

cin>>hours;

if (hours <= 50)

{

pay = hours * 25;

cout<<fixed<<showpoint;

cout<<setprecision(2);

epf = 0.11 * pay;

grosspay = pay - epf;

cout<<"Pay = RM"<<pay<<endl;

cout<<"EPF = RM"<<epf<<endl;

cout<<"Grosspay = RM"<<grosspay<<endl;

cout<<"------------------------------------------------"<<endl;

}

else

{

cout<<"You have worked extra "<<hours-50<<" hours."<<endl;

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

cout<<fixed<<showpoint;

cout<<setprecision(2);

epf = 0.11 * pay;

grosspay = pay - epf;

cout<<"Pay = RM"<<pay<<endl;

cout<<"EPF = RM"<<epf<<endl;

cout<<"Grosspay = RM"<<grosspay<<endl;

cout<<"------------------------------------------------"<<endl;

}

i++;

}while(i<6);

return 0;

}

# data[].attributes.body
print ('Hi')
print ('The Hourly pay rate is RM25.00')
i=1
for i in range (5):
name = input ("Enter Your Name: ")
hours = input ("Enter Your Working Hours: ")
if int(hours)>50:
print ("You have worked extra "+str(int(hours)-50)+" hours")
pay = 25.0 * (50.0 + 1.5 * (float(hours) - 50.0))
print("Pay = RM " + str("%.2f" % float(pay)))
EPF = 0.11 * float(pay)
print("EPF = RM " + str("%.2f" % float(EPF)))
grosspay = pay - EPF
print("Gross pay = RM " + str("%.2f" % float(grosspay)))
else:
pay = int(hours) * 25
print("Pay = RM " + str("%.2f" % float(pay)))
EPF = 0.11 * float(pay)
print("EPF = RM " + str("%.2f" % float(EPF)))
grosspay = pay - EPF
print("Gross pay = RM " + str("%.2f" % float(grosspay)))
print ("---------------------------------")
i+=1

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

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

cout<<"Hi "<<endl;
cout<<"Hourly pay rate is RM25.00"<<endl;
for (int i = 1; i <= 5 ; i = i+1)
{
cout<<"Enter your name : ";
cin.ignore();
cin.getline(name,20);
cout<<"Enter your working hours : ";
cin>>hours;
if (hours <= 50)
{
pay = hours * 25;
cout<<fixed<<showpoint;
cout<<setprecision(2);
epf = 0.11 * pay;
grosspay = pay - epf;
cout<<"Pay = RM"<<pay<<endl;
cout<<"EPF = RM"<<epf<<endl;
cout<<"Grosspay = RM"<<grosspay<<endl;
cout<<"------------------------------------------------"<<endl;
}
else
{
cout<<"You have worked extra "<<hours-50<<" hours."<<endl;
pay=25*(50+1.5*(hours-50));
cout<<fixed<<showpoint;
cout<<setprecision(2);
epf = 0.11 * pay;
grosspay = pay - epf;
cout<<"Pay = RM"<<pay<<endl;
cout<<"EPF = RM"<<epf<<endl;
cout<<"Grosspay = RM"<<grosspay<<endl;
cout<<"------------------------------------------------"<<endl;
}
}
return 0;
}

# data[].attributes.body
print("Hourly pay rate is RM 25.00")

i = 1

while i <= 5:

name = input("Name: ")

hours = input("Hours you have worked this week: ")

if int(hours) > 50:

print("You have worked extra " + str(int(hours)-50) + " hours.")

pay = 25.0 * (50.0 + 1.5 * (float(hours) - 50.0))

print("Income payment this week: RM " + str("%.2f" % float(pay)))

EPF = 0.11 * float(pay)

print("EPF: RM " + str("%.2f" % float(EPF)))

grosspay = pay - EPF

print("Gross pay: RM " + str("%.2f" % float(grosspay)))

else:

pay = int(hours) * 25

print("Income payment this week: RM " + str("%.2f" % float(pay)))

EPF = 0.11 * float(pay)

print("EPF: RM " + str("%.2f" % float(EPF)))

grosspay = pay - EPF

print("Gross pay: RM " + str("%.2f" % float(grosspay)))

print("\n" + "---------------------------------------------")

i = i + 1

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

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

cout<<"Hourly pay rate is RM 25.00"<<endl<<endl;

int i=1;
while(i<=5){
cout<<"Name: ";
cin.ignore();
cin.getline(name,20);
cout<<"Hours you have worked this week: ";
cin>>hours; cout<<endl;

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