60 347
Assignments Done
98%
Successfully Done
In April 2018

# Answer to Question #48844 in C# for Nandhini

Question #48844
Worker A can do a job in 15 days while worker B can do the same job in 20 days. How to write a program to calculate the total number of days required to finish the work if both the workers work simultaneously.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Freelance
{
&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; float work = 1;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; float workerA = 15, workerB = 20;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; float workA = work / workerA;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; float workB = work / workerB;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; float workAB = work / (workA + workB);
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Console.Write(&quot;Together they will do work for {0} days.&quot;, Math.Round(workAB, 1));
&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!

Assignment Expert
13.11.14, 17:13

Dear Nandhini,
please use panel for submitting new questions

Assignment Expert
13.11.14, 17:13

Dear Nandhini,
If you liked our service please press like-button beside answer field. Thank you!

Nandhini
13.11.14, 12:59

How to write a program to check whether the input alphabet is a vowel or not using switch case.

Nandhini
13.11.14, 12:57

Thank you so much. I really found it very useful.