Pages

Tuesday, October 8, 2013

Please contact me : I am SEM Bunthon is a student in IIC & ITB. My address : Dago lama, Bandung, Indonesia, Phone number : 085 881 453 384/081 296 470 759, Email : bunthon_sem@yahoo.com/bunthonsem62@gmail.com

spending money in c programming

The purpose of this program:
This program use for calculation spending money for employee and we know that:
If weekly hourlyworked pass than 40 hours that pass hour will equal 2 time normall hour.
How to use this program:
- The first input Hourlyworked must bigger 60
- Second after to you now I input 5
- If you input Hourlyworked less than 40 This program not do anything
- This is flowchart of this program:

#include
#include
int main(void)
{
int Hourlyworked, HourlyRate, Overtime, Pay;
printf("\n Please input Hourlyworked : ");
scanf("%d", &Hourlyworked);
printf("\n Please input HourlyRate : ");
scanf("%d", &HourlyRate);
Overtime = 0;
if(Hourlyworked > 40)
{
Overtime = Hourlyworked - 40;
Pay = (Hourlyworked * HourlyRate) + (2 * Overtime * HourlyRate);
printf("\n Pay for month : %d\n\n", Pay);
}
system("pause");
return 0;
}





https://www.youtube.com/watch?v=MyeizOT2mkU

No comments:

Post a Comment