What is the output of the following program?
#include <iostream>
using namespace std;
int main()
{
int firstNum = 28;
int secondNum = 25;
cout << firstNum << " " << secondNum << endl;
cout << (firstNum = 38 - 7) << endl;
cout << (firstNum <= 75) << endl;
cout << (firstNum > secondNum + 10) << endl;
cout << (firstNum >= 3 * secondNum - 100) << endl;
cout << (secondNum - 1 == 2 * firstNum) << endl;
cout << firstNum << " " << secondNum << endl;
return 0;
}
The output of this program is:
28 25
31
1
1
31 25
Comments
Leave a comment