Какое значение получит переменная b после выполнения программы: program qq; var a, b: integer; begin a : = 5; b : = a + 2; a : = (a + 2)*(b - 3); b : = a div 5; a : = a mod b; a : = a + 1; b : = (a + 14) mod 7; end.
Пройдемся по программе 1. a = 5 2. b = a + 2 = 5 + 2 = 7 3. a = (a + 2) * (b - 3) = (5 + 2) * (7 - 3) = 28 4. b = a div 5 = 28 div 5 = 5 5. a = a mod b = 28 mod 5 = 3 6. a = a + 1 = 3 + 1 = 4 7. b = (a + 14) mod 7 = 4 + 14 mod 7 = 4
1. a = 5
2. b = a + 2 = 5 + 2 = 7
3. a = (a + 2) * (b - 3) = (5 + 2) * (7 - 3) = 28
4. b = a div 5 = 28 div 5 = 5
5. a = a mod b = 28 mod 5 = 3
6. a = a + 1 = 3 + 1 = 4
7. b = (a + 14) mod 7 = 4 + 14 mod 7 = 4
ответ: 4
b = 5 + 2 = 7.
a = (5 + 2) * (7 - 3) = 7 * 4 = 28.
b = 28 div 5 = 5.
a = 28 mod 5 = 3.
a = 3 + 1 = 4.
b = (4 + 14) mod 7 = 18 mod 7 = 4.
ответ: 4.