Please code in C This is what the output should be formated

Please code in C#

This is what the output should be formated like this

Create an application that prompts the user for a storm windspeed in mph, then determines the correct typhoon category. The program must run all test cases of storm windspeed in one execution. Use a sentinel value to terminate the program. Do not assume a specific number of inputs. Determine the maximum storm windspeed value input. Note that the maximum must be evaluated within your program. You MAY NOT use C built in function. Output screenshot must include the input values shown below, their calculated typhoon level and the maximum storm wind speed entered Wind speed must be greater than zero. If zero or less, reprompt for that windspeed again Windspeed mph) hoon category 74 Tropical storm-not a typhoon 74 to 95 96 to 110 111 to 130 131 to 155 156 or more Run your application with the following data and save the screenshot of inputs and outputs to submit. Storm MPH

Solution

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Collections;

namespace Test
{


class Program
{
static void Main(string[] args)
{
List<int> windspeed = new List<int>();
while (true)
{
Console.WriteLine(\"Add Storm Windspeed/ Press q for quit\");
string val = (Console.ReadLine());
if ((val.ToLower()) != \"q\")
{
int number = Convert.ToInt32(val);
if (number > 0)
windspeed.Add(number);
}
else
{
break;
}
}
Console.WriteLine(\"STORM\\tMPH\");
if (windspeed.Count != 0)
{
int maxwindspeed = windspeed[0];
for (int i = 0; i < windspeed.Count; i++)
{
string cat = string.Empty;
if (windspeed[i] > maxwindspeed)
{
maxwindspeed = windspeed[i];
}
if (windspeed[i] < 74)
{
cat = \"Tropical Storm-Not A Typhoon\";
}
else if (windspeed[i] >= 74 && windspeed[i] <= 95)
{
cat = \"1\";
}
else if (windspeed[i] >= 96 && windspeed[i] <= 110)
{
cat = \"2\";
}
else if (windspeed[i] >= 111 && windspeed[i] <= 130)
{
cat = \"3\";
}
else if (windspeed[i] >= 131 && windspeed[i] <= 155)
{
cat = \"4\";
}
else
{
cat = \"5\";
}
Console.WriteLine(cat + \"\\t\" + windspeed[i]);
}
Console.WriteLine(\"Maximum Windspeed Is:\" + maxwindspeed);
}
Console.ReadKey();
}
}
}

Please code in C# This is what the output should be formated like this Create an application that prompts the user for a storm windspeed in mph, then determines
Please code in C# This is what the output should be formated like this Create an application that prompts the user for a storm windspeed in mph, then determines

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site