60 549
Assignments Done
97,9%
Successfully Done
In April 2018

# Answer to Question #44719 in C# for Rohit

Question #44719
Worker A can do a job in 15 days while worker B can do the same job in 20 days. Write a
program to calculate the total number of days required to finish the work if both the workers work
simultaneously.
using System;
namespace Q44719
{
&nbsp; &nbsp; class Program
&nbsp; &nbsp; {
&nbsp; &nbsp; &nbsp; &nbsp; static void Main(string[] args)
&nbsp; &nbsp; &nbsp; &nbsp; {
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; int A_work = 15;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; int B_work = 20;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Console.WriteLine(&quot;If worker A can do a job in {0} days&quot;,A_work);
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Console.WriteLine(&quot;while worker B can do the same job in {0} days&quot;, B_work);
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Console.WriteLine(&quot;So the total number of days required to finish the work &quot;);
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Console.WriteLine(&quot;if both the workers worksimultaneously is {0:#.##}&quot;, 1/(1/(double)A_work + 1/(double)B_work));
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Console.ReadKey();
&nbsp; &nbsp; &nbsp; &nbsp; }
&nbsp; &nbsp; }
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!