Lại Phương Thanh
New member
What will be the output of the following C++ code?
A. 2
B. 7
C. 9
D. 14
Code:
#include <iostream>
using namespace std;
int main ()
{
int a, b, c;
a = 2;
b = 7;
c = (a > b) ? a : b;
cout << c;
return 0;
}
B. 7
C. 9
D. 14