//Patrick Woods
//2-9-2023
//11am Lab
//Lab 3
//changes characters into windspeed and declares what kind of huricane they are

#include <stdio.h>

int main (void) {

char userChar;
int numCalc;
int userRepeat = 1;

while(userRepeat == 1){
userRepeat = 0;
numCalc = 0;
printf("Enter a character: \n");
scanf(" %c", &userChar);
printf("The decimal representation of your character %c is %d.\n",userChar, userChar);
numCalc = userChar;
numCalc = numCalc *2;
printf("Would (2 * '%c') be a hurricane??\n",userChar);
printf("(2 * '%c') = %i\n",userChar,numCalc);

if(numCalc < 74){
printf("Wind speed of %i is not strong enough to be a hurricane.\n", numCalc);
}
else if((numCalc >= 74) && (numCalc <= 95)){
printf("Wind speed of %i is a Category 1 hurricane.\n", numCalc);
}
else if((numCalc >= 96) && (numCalc <=110)){
printf("Wind speed of %i is a Category 2 hurricane.\n", numCalc);
}
else if((numCalc >= 111) && (numCalc <=130)){
printf("Wind speed of %i is a Category 3 hurricane.\n", numCalc);
}
else if((numCalc >= 131) && (numCalc <= 155)){
printf("Wind speed of %i is a Category 4 hurricane.\n", numCalc);
}
else{
printf("Wind speed of %i is a Category 5 hurricane.\n", numCalc);
}

printf("- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n");

printf("Enter 1 to go again or 0 to quit: \n");

scanf(" %d",&userRepeat);
}
}
