Question: Instructions The Saffir - Simpson Hurricane Scale classifies hurricanes into five categories numbered 1 through 5 . Write an application named Hurricane that outputs a
Instructions
The SaffirSimpson Hurricane Scale classifies hurricanes into five categories numbered through
Write an application named Hurricane that outputs a hurricanes category based on the users input of
the wind speed.
Category hurricanes have sustained winds of at least miles per hour. The minimum sustained
wind speeds for categories through are and miles per hour, respectively.
Any storm with winds of less than 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.
Solution
using System;
using static System.Console;
class Hurricane
static void Main
int wind;
int category ;
const int CAT;
const int CAT;
const int CAT;
const int CAT;
const int CAT;
WriteEnter wind speed for hurricane ;
wind Convert.ToIntReadLine;
ifwind CAT
category ;
else
ifwind CAT
category ;
else
ifwind CAT
category ;
else
ifwind CAT
category ;
else
ifwind CAT
category ;
ifcategory
WriteLineThis is not a hurricane";
else
WriteLineThis is a category hurricane", category;
Previously you wrote a program named Hurricane that classified hurricanes into five categories using the SaffirSimpson Hurricane Scale. Now, create a modified version named HurricaneModularized that passes a users input wind speed to a method that returns the hurricane category.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
