//Robert Magnuson
//2/7/23
//Section 10
//Lab 3
//This program reads user input to give a category of hurricane
#include <stdio.h>

int main() {
	int a;
	a=1;
	while (a == 1){
	char input;
	int newinput;
	printf("Enter a character:\n");
	fscanf(stdin, " %c", &input);
	printf("The decimal representation of your character is %d\n", input);
	newinput = input * 2;
	printf("2 * %d = %d\n", input, newinput);
	if ((input * 2) < 74) {
		printf("Your windspeed is too low for a hurricane category");
	};
	if ((input * 2) > 74 && (input * 2) <= 95) {
		printf("Your windspeed matches a category 1 hurricane");
	};
	if ((input * 2) >= 96 && (input * 2) <= 110) {
                printf("Your windspeed matches a category 2 hurricane");
	};
	if ((input * 2) >= 111 && (input * 2) <= 130) {
                printf("Your windspeed matches a category 3 hurricane");
	};
	if ((input * 2) >= 131 && (input * 2) < 155) {
                printf("Your windspeed matches a category 1 hurricane");
	};
	if ((input * 2) >= 155) {
                printf("Your windspeed matches a category 5 hurricane");
	};
	printf("\nWould you like to go again? Enter 1 for yes and 0 for no\n");
	scanf("%d", &a);
	};
};
