In: Computer Science
Give the value of x (x is an integer and assume integer arithmetic for all operations).
________ 1. x = 12 - 4 * 2 - 8;
________ 2. x = 24 / 2 + 1 * 4;
________ 3. x = 12 - 9 + 4 * 2 + 3 ^ 4;
________ 4. x = 24/(3 + 2) * 4;
________ 5. x = 2 * (5 - 3) + 7;
________ 6. x = 12 - (15/5 - 2) * 5;
________ 7. x = 20 - 15/((5 - 2) * 5);
________ 8. x = 13 % 5;
Evaluate the following equations, given A = 12, B = 3, C = 6, D = 2 ,A, B, C, and D are integers, and all operations are integer
________ 9. x = A + B/C - D^2.;
________ 10. x = A + B/(C - D^2);
________ 11. x = (A + B) % C;
________ 12. x = (A + B)/C - D^2;
Assume the following order of operations:
!
&&
||
Give the value of x,
given A = FALSE, B = FALSE, C = FALSE, D = TRUE. E = 10, F = 15
________ 13. x = A && B
________ 14. x = C || D
________ 15. x = !C
________ 16. x = !(A && D)
________ 17. x = !C && B
________ 18. x = ( E < 10) && (E == F)
________ 19. x = A && B || C && D
________ 20. x = !(A && B) || !(D && C)
Write c++ statements for each of the following (no declarations necessary here):