Hello
Can someone help me with this C# problem
The Saffir-Simpson Hurricane Scale classifies hurricanes into five categories numbered 1 through 5. Write an application named Hurricane that outputs a hurricane’s category based on the user’s input of the wind speed.
Category 5 hurricanes have sustained winds of at least 157 miles per hour. The minimum sustained wind speeds for categories 4 through 1 are 130, 111, 96, and 74 miles per hour, respectively.
Any storm with winds of less than 74 miles per hour is not a hurricane.
If a storm falls into one of the hurricane categories, output This is a category # hurricane, with # replaced by the category number.
If a storm is not a hurricane, output This is not a hurricane.
The answer to this question is as follows:
The code is as follows:
using System;
class Program
{
static void Main() {
int speed,category;
//reading the speed in runtime
speed=Convert.ToInt32(Console.ReadLine());
if(speed>=74 && speed<96)
{
category=1;
}
else if(speed>=96 && speed<111)
{
category=2;
}
else if(speed>=111 && speed<130)
{
category=3;
}
else if(speed>=130 && speed<157)
{
category=4;
}
else if(speed>=157)
{
category=5;
}
else
{
category=-1;
}
if(category>0)
{
Console.WriteLine("This is category "+category+" hurricane");
}
else
{
Console.WriteLine("This is not a hurricane");
}
}
}
The input and ouput are provided in the screenshot below:
Hello Can someone help me with this C# problem The Saffir-Simpson Hurricane Scale classifies hurricanes into...
In MATLAB how do you write a program to determine what type of tropical system and/or category hurricane a system is depending on the wind speed. For example winds in a tropical system at 35 MPH means that the system is a tropical depression. If the winds are at 50 MPH, then the system is a tropical storm. If the winds are at 100 MPH, the system is a category two hurricane. Also, write a similar program on the Fujita...
Write in JAVA Get Familiar with the Problem Carefully read the program description and look at the data file to gain an understanding of what is to be done. Make sure you are clear on what is to be calculated and how. That is, study the file and program description and ponder! Think! The Storm Class Type Now concentrate on the Storm class that we define to hold the summary information for one storm. First, look at the definition of...