Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- cout << "MAGNITUD ANTEPENULTIM SISME:" << endl;
- float antepenultim;
- cin >> antepenultim;
- cout << "MAGNITUD PENULTIM SISME:" << endl;
- float penultim;
- cin >> penultim;
- cout << "MAGNITUD DARRER SISME:" << endl;
- float ultim;
- cin >> ultim; if (penultim >= 4){ cout << "ALERTA VERMELLA"; return 0; }if (antepenultim >= 4){ cout << "ALERTA VERMELLA"; return 0; }
- if (ultim >= 4){ cout << "ALERTA VERMELLA"; return 0; }
- if (penultim - antepenultim > 0 && ultim - penultim > 0){ if (ultim >= 3){ cout << "ALERTA TARONJA"; return 0; }cout << "ALERTA GROGA"; return 0; }
- cout << "NO HI HA ALERTA";
- cin.get();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement