We are given several programming problems and we need to determine the correct outputs for each one. Problem 14: Determine the values of $7/2$ and $7 \text{ DIV } 2$. Problem 15: Evaluate the expression $(4*3+5 \text{ DIV } 2) + 5^2$. Problem 16: Evaluate the expression $9 \text{ MOD } 10$ and $10 \text{ MOD } 9$. Problem 17: Determine the output of the Pascal statement "Writeln(25 div 2)". Problem 18: Determine the output of "writeln (15 mod 6 * 2+ 2> 7)" expression written in Pascal. Problem 19: Evaluate the logical statements: A) $(9>15) \text{ AND } (35>25)$, B) $(25>14) \text{ OR } (15>57)$, C) $\text{NOT}(9>14)$. Problem 20: Find the output of the given pseudo code.
2025/3/17
1. Problem Description
We are given several programming problems and we need to determine the correct outputs for each one.
Problem 14: Determine the values of and .
Problem 15: Evaluate the expression .
Problem 16: Evaluate the expression and .
Problem 17: Determine the output of the Pascal statement "Writeln(25 div 2)".
Problem 18: Determine the output of "writeln (15 mod 6 * 2+ 2> 7)" expression written in Pascal.
Problem 19: Evaluate the logical statements: A) , B) , C) .
Problem 20: Find the output of the given pseudo code.
2. Solution Steps
Problem 14:
(integer division)
Therefore, the answer is 3.5 and
3.
Problem 15:
Problem 16:
Therefore, the answer is 9 and
1.
Problem 17:
"Writeln(25 div 2)"
(integer division in Pascal)
Therefore, the answer is
1
2.
Problem 18:
"writeln (15 mod 6 * 2+ 2> 7)"
which is TRUE.
Therefore, the answer is TRUE.
Problem 19:
A)
FALSE AND TRUE = FALSE
B)
TRUE OR FALSE = TRUE
C)
NOT(FALSE) = TRUE
Therefore, the answer is False, True, True.
Problem 20:
x = 0
num = 100
Loop 1:
x = 0 + 10 = 10
num = 100 - 10 = 90
Print num = 90
Loop 2:
x = 10 + 10 = 20
num = 90 - 20 = 70
Print num = 70
Loop 3:
x = 20 + 10 = 30
num = 70 - 30 = 40
Print num = 40
Loop 4:
x = 30 + 10 = 40
num = 40 - 40 = 0
Print num = 0
Loop 5:
x = 40 + 10 = 50
x >= num is 50 >= 0 which is TRUE, so the loop terminates.
Therefore, the output is 90, 70, 40, 0
3. Final Answer
1
4.
3. 3.5 and 3
1
5.
3. 39
1
6.
2. 9 and 1
1
7.
1. 12
1
8.
3. TRUE
1
9.
3. False, True, True
2
0.