#include int main() { //declare variables int isFah, userTemp; float fConv; char cSelection; printf("Please select an option form the following menu:\ \n\n\t\tA. Fahrenheit to Centigrade\ \n\t\tB. Centigrade to Fahrenheit\ \n\t\tC. Exit\n\t\t\tSelect A/B/C> "); scanf("%c", &cSelection); if(cSelection == 'A' || 'a') { isFah = 1; printf("Enter the degrees in Fahrenheit: "); scanf("%d", &userTemp); fConv = userTemp * 1.8f + 32; } else { if(cSelection == 'B' || 'b') { isFah = 0; printf("Enter the degrees in Centigrade: "); scanf("%d", &userTemp); fConv = (userTemp - 32) / 1.8f; } else { if(cSelection == 'C' || 'c') { printf("exiting....\n\n"); return 1; } } } printf("%d degrees %s is %.0f degrees centigrade\n", userTemp, isFah ? "Fahrenheit" : "Centigrade", fConv); return 0; }