fork download
  1. #include <stdio.h>
  2.  
  3. void checkTemperature(float temp) {
  4. if (temp < 97.0) {
  5. printf("Temperature: %f°F - Low", temp);
  6. }
  7. else if (temp >= 97.0 && temp <= 99.0) {
  8. printf("Temperature: %f°F - Normal", temp);
  9. }
  10. else {
  11. printf("Temperature: %f°F - High", temp);
  12. }
  13. }
  14.  
  15. int main() {
  16. float temp;
  17.  
  18. checkTemperature(100.0);
  19.  
  20. return 0;
  21. }
Success #stdin #stdout 0.01s 5292KB
stdin
Standard input is empty
stdout
Temperature: 100.000000°F - High