Gönderi tarihi: 31 Ekim , 2007 18 yıl Arkadaşlar aşağıda yazacağım problemi kısa sürede çözebilirseniz çok makbule geçecek.Yalnız soru İngilizce. Soru : Write a program in C to compute a company's weekly salary. The program will allow the salary clerk (user) to input the employee’s ID number (int), hours worked (int) and the salary per hour (float) for 8 employees. The program should compute and display the ID, regular salary, overtime salary, and total salary for each employee. Salaries are computed as follows: • Regular salary: If the hours worked are 40 or less, regular salary is computed as the salary per hour multiplied by the hours worked; if more than 40 hours are worked, regular salary is computed as the salary per hour multiplied by 40. • Overtime salary: If the hours worked are 40 or less, overtime salary is zero; if more than 40 hours are worked, overtime salary is computed as the number of hours worked above 40 multiplied by 70% the salary per hour. • Total salary: Total salary is the sum of regular salary and overtime salary. The program will continue to execute for 7 employees. Then at the end the program, display the largest overtime salary and the ID of that employee. Your program should have a while loop and if/else statements. Examples: Assuming the salary per hour for an employee is 25. If an employee worked for 30 hours per week then the regular salary is 30*25= 750 and the overtime salary is 0. If an employee worked 45 hours the regular salary is 25*40 = 1000 and the overtime salary is 70/100*25*(45-40) = 87.5
Katılın Görüşlerinizi Paylaşın
Şu anda misafir olarak gönderiyorsunuz. Hesabınız varsa, hesabınızla gönderi paylaşmak için ŞİMDİ OTURUM AÇIN.
Eğer üye değilseniz hemen KAYIT OLUN.
Not: İletiniz gönderilmeden önce bir Moderatör kontrolünden geçirilecektir.