fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int temperatura = 20;
  6.  
  7. switch(temperatura){
  8.  
  9. case 26 :
  10. printf("temperatura ideale");
  11. break;
  12.  
  13. default :
  14. if (temperatura > 26){
  15. printf("accendi condizionatore");
  16. break;
  17. } else {
  18. printf("accendi riscaldamento");
  19. }
  20. break;
  21. }
  22.  
  23.  
  24. return 0;
  25. }
Success #stdin #stdout 0.01s 5292KB
stdin
Standard input is empty
stdout
accendi riscaldamento