/* Program to input a temperature and print a warning if the number is negative. */ #include main () { float temperature; /* Print a prompt for the user */ printf("Please enter the temperature in Kelvins: "); /* Input number and check. */ scanf("%f", &temperature); if (temperature < 0.0) { printf("Temperatures can't be negative!\n"); } /* (A touching farewell message) */ printf("Temperature processed.\n"); }