Advertisement
Guest User

Untitled

a guest
Oct 13th, 2015
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. cout << "MAGNITUD ANTEPENULTIM SISME:" << endl;
  8. float antepenultim;
  9. cin >> antepenultim;
  10.  
  11. cout << "MAGNITUD PENULTIM SISME:" << endl;
  12. float penultim;
  13. cin >> penultim;
  14.  
  15. cout << "MAGNITUD DARRER SISME:" << endl;
  16. float ultim;
  17. cin >> ultim; if (penultim >= 4){ cout << "ALERTA VERMELLA"; return 0; }if (antepenultim >= 4){ cout << "ALERTA VERMELLA"; return 0; }
  18. if (ultim >= 4){ cout << "ALERTA VERMELLA"; return 0; }
  19. if (penultim - antepenultim > 0 && ultim - penultim > 0){ if (ultim >= 3){ cout << "ALERTA TARONJA"; return 0; }cout << "ALERTA GROGA"; return 0; }
  20. cout << "NO HI HA ALERTA";
  21. cin.get();
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement