Md Nayeem

Md Nayeem

  • NA
  • 75
  • 22.8k

I am not getting proper output in this C program.

Aug 8 2017 5:24 PM
I am not getting proper output in this C program.After Compile and run This
program give me errors.I trying to fix the errors.
 
 
#include <stdio.h>
main()
{
int hours_worked,wages_per_hour,overtime_charge=0,overtime_hours=0,salary;
printf("Enter How Many Hours Worked=");
Scanf("%d", &hours_worked);
Prinf("Enter Wages Per Hour");
Scanf("%d", &Wages_per_hour);
if(hours_worked>30)
{
overtime_hours=hours_worked-30;
overtime_charge=overtime_hours*(2*wages_per_hour);
hours_worked=hours_worked-overtime_hours;
}
salary=(hour_worked*wages_per_hour)+overtime_charge;
printf("EnterSalary=%d,salary");
return 0;
}
 
 

Answers (5)