Q. Write a program to calculate in how many days a work will be completed by three persons A, B and C together. A, B, C take x days, y days and z days respectively to do the job alone.  The formula to calculate the number of days if they work together is xyz/(xy + yz + xz) days where x, y, and z are given as input to the program.


Answer:-


x = int(input("Enter No. of days takes by A :- "))
y = int(input("Enter No. of days takes by B :- "))
z = int(input("Enter No. of days takes by C :- "))
day = (x*y*z)/((x*y) + (y*z) + (x*z)) 
print ("number of days if they work together is ", day)


Output:-

Enter No. of days takes by A :- 10
Enter No. of days takes by B :- 12
Enter No. of days takes by C :- 13
number of days if they work together is  3.8423645320197046
>>>

Post a Comment

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Previous Post Next Post