Advertisement
Guest User

Untitled

a guest
Mar 25th, 2019
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. int main(){
  2. int a[3];
  3. int max = 0;
  4. for(int i=1;i<4;i++){
  5. cout <<"inserire numero " << i <<"\n";
  6. cin >> a[i-1];
  7. }
  8. if(a[0]>a[1])
  9. max = a[0];
  10. else max = a[1];
  11. if(max>a[2])
  12. else max = a[2]
  13.  
  14.  
  15. cout << "massimo = " << max <<"\n";
  16. return 0;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement