fork download
  1. #include <stdio.h>
  2.  
  3. int main(){
  4.  
  5. int temp;
  6.  
  7. scanf("%d", &temp);
  8.  
  9. if(temp > 30){
  10. printf("it's hot\n");
  11.  
  12. if(temp >= 100){
  13. printf("water would boil\n");
  14. }
  15. }
  16.  
  17. else if(temp < 10){
  18. printf("it's cold\n");
  19.  
  20. if(temp <= 0){
  21. printf("water would freeze\n");
  22. }
  23. }
  24.  
  25. else{
  26. printf("it's ok\n");
  27. }
  28.  
  29. return 0;
  30. }
Success #stdin #stdout 0s 9424KB
stdin
31
stdout
it's hot