#include //Program to convert celsius to fahrenheit or vis versa. int main (void) { char unit[9]; double tempc, tempf; double toc, tof; printf("Would you like to start with Celsius or Fahrenheit?\n"); scanf("%s",&unit); printf("What temperature?"); if (strcmp(unit,"Celsius")==0) scanf("%lf", &tempc); else scanf("%lf", &tempf); tof=1.8*tempc + 32; toc=(tempf-32)/1.8; if (strcmp(unit,"Celsius") == 0) printf("That temperature converts to %.0f degrees Fahrenheit.\n", tof); else printf("That temperature converts to %.0f degrees Celsius.\n", toc); system("pause"); return 0; }