fork(1) download
  1. #include <iostream>
  2. using namespace std;
  3. /* ricerca il massimo valore tra 3 numeri interi dati in input 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. else {cout<<"max= "<<z<<endl;}}
  11.  
  12.  
  13. return 0;
  14. }
Success #stdin #stdout 0.01s 5324KB
stdin
5 17 8
stdout
max= 17