Created
October 18, 2015 15:28
-
-
Save Steffo99/2916b6aed23d70cb7b78 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
int main() | |
{ | |
int a, b, c; | |
cout << "Numero A: "; | |
cin >> a; | |
cout << "Numero B: "; | |
cin >> b; | |
cout << "Numero C: "; | |
cin >> c; | |
if(a > b) | |
{ | |
if(a > c) | |
{ | |
cout << "A e' il numero piu' grande\n"; | |
} | |
else if(c > a) | |
{ | |
cout << "C e' il numero piu' grande\n"; | |
} | |
else | |
{ | |
cout << "A e C sono i numeri piu' grandi\n"; | |
} | |
} | |
else if(b > a) | |
{ | |
if(b > c) | |
{ | |
cout << "B e' il numero piu' grande\n"; | |
} | |
else if(c > b) | |
{ | |
cout << "C e' il numero piu' grande\n"; | |
} | |
else | |
{ | |
cout << "B e C sono i numeri piu' grandi\n"; | |
} | |
} | |
else | |
{ | |
if(a > c) | |
{ | |
cout << "A e B sono i numeri piu' grandi\n"; | |
} | |
else if(c > a) | |
{ | |
cout << "C e' il numero piu' grande\n"; | |
} | |
else | |
{ | |
cout << "Tutti e tre i numeri sono uguali\n"; | |
} | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment