Question: (C++) Please write the calculations to evaluate each expression and, write the printout of the program. #include using namespace std; int main() { int i
(C++) Please write the calculations to evaluate each expression and, write the printout of the program.
#include
using namespace std;
int main()
{
int i = 1, j = 2, k = 5;
cout << "1: " << (k < i - j) << endl;
cout << "2: " << (++i == j) << endl;
cout << "3: " << ((k - i-- > j) && (k == j * 2)) << endl;
cout << "4: " << (!(k > j) || (i == k % j)) << endl;
cout << "5: " << (((k - i) && (j > 2)) || !i) << endl;
return 0;
}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
