Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started