Skip to content

Instantly share code, notes, and snippets.

@Steffo99
Created October 18, 2015 15:28
Show Gist options
  • Save Steffo99/2916b6aed23d70cb7b78 to your computer and use it in GitHub Desktop.
Save Steffo99/2916b6aed23d70cb7b78 to your computer and use it in GitHub Desktop.
#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