fork download
  1. #include <iostream>
  2. using namespace std;
  3. /* ricerca il massimo valore tra 3 numeri interi dati in imput dall'utente*/
  4. int x,y,z;
  5. int main() {
  6. cin>>x>>y>>z;
  7. if (x>y) { if (x>z) { cout<< "max= "<<x<<endl;}
  8. else {cout<<"max= "<<z<<endl;}}
  9. else {if(y>z) {cout<<"max= "<<y<<endl;}}
  10. return 0;
  11. }
Success #stdin #stdout 0s 5324KB
stdin
12  7   8 
stdout
max= 12