شباب ومهندسين
اشكركم على هذا الموقع بلييييز ابغي مساعدة في هذا سؤال ما عرفت اكتب الكودات
ممكن حد يساعدني و يكتبلي بلغة سي بلس بلس
السؤال هو
Write a program that determines the possible ways to divide up 200 hours of work between four workers. The distribution of hours between the workers is done according to the following conditions:
• If the first worker wants to work for 2 days only then he must work for 2 hours in each day, so his total working hours is 4 hours.
• If the second worker wants to work for 4 days only then he must work for 4 hours in each day, so his total working hours is 16 hours.
• If the third worker wants to work for 6 days only then he must work for 6 hours in each day, so his total working hours is 36 hours.
• The fourth worker then must work for 12 days and he must work for 2 hours in each day, so his total working hours is 144 hours.
• The total work hours for the 4 workers then is: 4 + 16 + 36 + 144 = 200.
The program is to find and print all possible combinations of integers that satisfy the above conditions.
للعلم اما حاولت استعمل while statement or for statment
بس ما نفع ارجووكم ساعدوني لاني اتعقدت