- Joined
- Dec 9, 2009
- Sythe Gold
- 57
- Messages
- 383
Well, I've got a school task and I have some problems with it.
I need to make a program in which you put in 3 numbers and it prints out which one is the biggest. I have that done already, no problem. The problem is that when I enter 2 of the same numbers (example 5 5 1) it says that 1 is the biggest. I don't know what to do
.
Here's what I have:
Please help me guys =)
I need to make a program in which you put in 3 numbers and it prints out which one is the biggest. I have that done already, no problem. The problem is that when I enter 2 of the same numbers (example 5 5 1) it says that 1 is the biggest. I don't know what to do
Here's what I have:
Code:
int main(int argc, char *argv[])
{
int a, b, c;
cin >> a >> b >> c;
if (a > b && a > c)
{
cout << "A is the biggest" << endl;
}
else if (b > a && b > c)
{
cout << "B is the biggest" << endl;
}
else
{
cout << "C is the biggest" << endl;
}
system("PAUSE");
return EXIT_SUCCESS;
}
Please help me guys =)




































