0

A c program that print salary

please someone should help me with a program that accept staff Id, total work hour per week, and print the total result for a monthly and salary Note: 3.3 hours per day, $2 per hour Thanks

5th Aug 2021, 9:49 AM
Subad
Subad - avatar
12 Antworten
+ 8
Subad Can we show your attempts?
5th Aug 2021, 9:55 AM
A͢J
A͢J - avatar
+ 3
A͢J - S͟o͟l͟o͟ H͟e͟l͟p͟e͟r͟ #include<stdio.h> int main() { char id[10]; int hour; double value,salary; printf("Input the Employees ID( Max. 10 chars):"); scanf("%s",&id); printf("\nInput the working hrs per week: "); scanf("%d",&hour); printf("\nSalary amount/hr: "); scanf("%lf",&value); salary=value*hour; printf("\nEmployees ID = %s\nSalary = U$ %.2lf\n",id,salary); return 0; }
5th Aug 2021, 10:02 AM
Subad
Subad - avatar
+ 2
Rishi this fits thank you so much 😃but there’s a little changes to make
5th Aug 2021, 3:55 PM
Subad
Subad - avatar
+ 2
Subad Your calculation should be working_hour_per_day = total_working_hour_per_week / 7; total_monthly_working_hour = 30 * working_hour_per_day; total_monthly_salary = total_monthly_working_hour * amount_per_hour; But I have a question: In this case what is the use of 3.3 hours per day if employees have total_work_hour_per_week? 2nd what would be if 3.3 * 7 = 23.1 hours_per_week is less than or greater than from total_work_hour_per_week?
5th Aug 2021, 5:52 PM
A͢J
A͢J - avatar
0
Subad Your problem statement is looking little bit confusing and incomplete.
5th Aug 2021, 12:46 PM
A͢J
A͢J - avatar
0
Simba input should be number of total work hour per week and output should be total salary in a month
5th Aug 2021, 2:27 PM
Subad
Subad - avatar
0
Subad In description hour per week and in notes 3.3 hours per day. I didn't get this. Ans what is $2 per hour?
5th Aug 2021, 2:28 PM
A͢J
A͢J - avatar
0
A͢J - S͟o͟l͟o͟ H͟e͟l͟p͟e͟r͟ I mean each one hour the employee should be paid $2 and the maximum hour a day is 3.3 hours
5th Aug 2021, 2:31 PM
Subad
Subad - avatar
5th Aug 2021, 3:18 PM
Rishi
Rishi - avatar
0
In each day 3.3 hours are used so as you said 3.3*7 = 23.1 hours a week making 92.4 a month
5th Aug 2021, 6:16 PM
Subad
Subad - avatar
0
Ya
6th Aug 2021, 2:18 AM
Ankit Kumar
Ankit Kumar - avatar
- 1
A͢J - S͟o͟l͟o͟ H͟e͟l͟p͟e͟r͟ can you please create the program for me?
5th Aug 2021, 1:21 PM
Subad
Subad - avatar