# data[].attributes.body
Lim Yu Jie 1181101201 T2
Nur Sarah Najihah binti NorAlahyadi 1181101195 T2
Loong Jiehyi  1181101768 T3
Tey Yee Yang Brandon 1181100671 T1
Ong Han Bin 1181100721 T1

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

int main()
{
string name;
float hours;
float extra_hours;
const float rate=25.00;
float pay,epf;
int i;

for(i=0 ; i<6 ; i++)
{
cout<<endl;
cout<<"Enter your name: "<<endl;
cin>>name;
cout<<"Enter hours work: "<<endl;
cin>>hours;

if (hours>40)
{
extra_hours=hours-40;
cout<<"Extra hour worked: "<<extra_hours<<endl;
pay=rate*(40+1.5*(hours-40));
epf=pay*0.11;
cout<<fixed<<setprecision(2)<<"Income payment: RM "<<pay<<endl;
cout<<fixed<<setprecision(2)<<"EPF payment: RM "<<epf<<endl;
}
else
{
pay=hours*rate;
epf=pay*0.11;
cout<<fixed<<setprecision(2)<<"Income payment: RM "<<pay<<endl;
cout<<fixed<<setprecision(2)<<"EPF payment: RM "<<epf<<endl;
}
cout<<"Thank you."<<endl;
}
return 0;
}

# data[].attributes.body
for i in range(1,6):
  name=input('%d) What is your name: '%i)
  hours=int(input('Hours Worked: '))
  rate=25.00
  if (hours>40):
    pay=rate*(40+1.5*(hours-40))

  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)
print("Thank you.")

# data[].attributes.body
#include <iostream>
#include<iomanip>
using namespace std;
int main()
{
int i=0;
string name;
float hours;
float extra_hours;
const float rate=25.00;
float pay,epf;
do
{
cout<<endl;
cout<<"Enter your name: "<<endl;
cin>>name;
cout<<"Enter hours work: "<<endl;
cin>>hours;
if (hours>40)
{
extra_hours=hours-40;
cout<<"Extra hour worked: "<<extra_hours<<endl;
pay=rate*(40+1.5*(hours-40));
epf=pay*0.11;
cout<<fixed<<setprecision(2)<<"Income payment: RM "<<pay<<endl;
cout<<fixed<<setprecision(2)<<"EPF payment: RM "<<epf<<endl;
}
else
{
pay=hours*rate;
epf=pay*0.11;
cout<<fixed<<setprecision(2)<<"Income payment: RM "<<pay<<endl;
cout<<fixed<<setprecision(2)<<"EPF payment: RM "<<epf<<endl;
}
i++;
}while (i<6);
cout<<"Thank you."<<endl;
return 0;
}

# data[].attributes.body
#include <iostream>
#include<iomanip>
using namespace std;
int main()
{
int i=0;
string name;
float hours;
float extra_hours;
const float rate=25.00;
float pay,epf;

while(i<6)
{
cout<<endl;
cout<<"Enter your name: "<<endl;
cin>>name;
cout<<"Enter hours work: "<<endl;
cin>>hours;

if (hours>40)
{
extra_hours=hours-40;
cout<<"Extra hour worked: "<<extra_hours<<endl;
pay=rate*(40+1.5*(hours-40));
epf=pay*0.11;
cout<<fixed<<setprecision(2)<<"Income payment: RM "<<pay<<endl;
cout<<fixed<<setprecision(2)<<"EPF payment: RM "<<epf<<endl;
}
else
{
pay=hours*rate;
epf=pay*0.11;
cout<<fixed<<setprecision(2)<<"Income payment: RM "<<pay<<endl;
cout<<fixed<<setprecision(2)<<"EPF payment: RM "<<epf<<endl;
}
i++;
}
cout<<"Thank you."<<endl;
return 0;
}

# data[].attributes.body
i=1

while (i<=5):
  name=input('%d) What is your name: '%i)
  hours=int(input('Hours Worked: '))
  rate=25.00
  if (hours>40):
    pay=rate*(40+1.5*(hours-40))
  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)
print("Thank you.")