Hey So I am learning basic c++ just started this week, I have a question that says:
Write a program to compare 3 integers and print the largest, the program should ONLY Use 2 IF statements.
I am not sure how to do this so any help would be appreciated
So far I have this:
#include <iostream>
using namespace std;
void main()
{
int a, b, c;
cout << "Please enter three integers: ";
cin >> a >> b >> c;
if ( a > b && a > c)
cout << a;
else if ( b > c && b > a)
cout << b;
else if (c > a && c > b)
cout << b;
system("PAUSE");
}