60 642
Assignments Done
97,8%
Successfully Done
In April 2018

Answer to Question #12061 in C# for Candice

Question #12061
A circular racetrack is composed of 4 portions: concrete, mud, sand and asphalt.
Kevin&#039;s car takes 30 seconds to cross the concrete, 55 seconds to cross the mud, 47 seconds to cross the sand and 38 seconds to cross the asphalt. Dear Ma&#039;am or Sir, please help me to create a program that would input a positive time value (in seconds) and output where in the track Kevin&#039;s car is after that specified time.Assume that the race starts at the beginning of the concrete. Moreover, the car go around the track more that once.
int time=0;

while (time &gt; 170) {
time = time - 170;

}
if ((time &gt; 0) && (time &lt;= 30))

{
Console.WriteLine(&quot;Concrete&quot;);

}
if((time&gt;30) && (time&lt;=85)) {

Console.WriteLine(&quot;Mud&quot;);
}
if ((time &gt; 85)
&& (time &lt;= 132))
{

Console.WriteLine(&quot;Sand&quot;);
}
if ((time &gt; 132)
&& (time &lt;= 170))
{

Console.WriteLine(&quot;Asphalt&quot;);
}

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!