Esercizio no.4:soluzione
#include <iostream>
using namespace std;
int main() {
long long a, b, c;
cout << “Inserisci tre interi (a b c): “;
if (!(cin >> a >> b >> c)) {
cout << “Input non valido.\n”;
return 0;
}
bool strettamente = (a < b) && (b < c); // a < b < c
bool non_decresc = (a <= b) && (b <= c); // a <= b <= c
if (strettamente) {
cout << “In ordine strettamente crescente (a < b < c).” << endl;
} else if (non_decresc) {
cout << “In ordine crescente (consentite uguaglianze: a <= b <= c).” << endl;
} else {
cout << “Non in ordine crescente.” << endl;
}
return 0;
}