M[0]: = 11; M[1]: = 6; M[2]: =18; M[1]: = M[0]+M[2]; M[0]: = M[1] * M[2]; M[2]: = M[0] - M[1];
Введи значения, которые получат переменные массива после выполнения этого фрагмента программы. M[1] = ..... M[0] = ..... M[2] = .....Ответы на вопрос
        const N=4;
var i : integer;
M:array[-1..N]of integer;
begin
M[0]:=11;
M[1]:=6;
M[2]:=18;
M[1]:=M[0]+M[2];
M[0]:=M[1]*M[2];
M[2]:=M[0]-M[1];
writeln('M[1]= ',M[1]);
writeln('M[0]= ',M[0]);
writeln('M[2]= ',M[2]);
end.

            Given Code Fragment:
``` M[0] += 11; M[1] += 6; M[2] += 18; M[1] += M[0] + M[2]; M[0] += M[1] * M[2]; M[2] += M[0] - M[1]; ```To determine the values of the array variables `M[0]`, `M[1]`, and `M[2]` after executing this code fragment, let's go step by step.
1. After the first line of code, `M[0] += 11;`, the value of `M[0]` will be 11.
2. After the second line of code, `M[1] += 6;`, the value of `M[1]` will be 6.
3. After the third line of code, `M[2] += 18;`, the value of `M[2]` will be 18.
4. After the fourth line of code, `M[1] += M[0] + M[2];`, the value of `M[1]` will be the sum of `M[0]`, `M[1]`, and `M[2]`. Since `M[0]` is 11 and `M[2]` is 18, the value of `M[1]` will be 6 + 11 + 18 = 35.
5. After the fifth line of code, `M[0] += M[1] * M[2];`, the value of `M[0]` will be the sum of `M[0]` and the product of `M[1]` and `M[2]`. Since `M[1]` is 35 and `M[2]` is 18, the value of `M[0]` will be 11 + (35 * 18) = 641.
6. After the sixth line of code, `M[2] += M[0] - M[1];`, the value of `M[2]` will be the sum of `M[0]` and the difference between `M[0]` and `M[1]`. Since `M[0]` is 641 and `M[1]` is 35, the value of `M[2]` will be 18 + (641 - 35) = 624.
Therefore, the final values of the array variables `M[0]`, `M[1]`, and `M[2]` after executing this code fragment will be: - `M[0]` = 641 - `M[1]` = 35 - `M[2]` = 624
Please let me know if you need any further assistance!
Топ вопросов за вчера в категории Информатика
Последние заданные вопросы в категории Информатика
- 
			
Математика
 - 
			
Литература
 - 
			
Алгебра
 - 
			
Русский язык
 - 
			
Геометрия
 - 
			
Английский язык
 - 
			
Химия
 - 
			
Физика
 - 
			
Биология
 - 
			
Другие предметы
 - 
			
История
 - 
			
Обществознание
 - 
			
Окружающий мир
 - 
			
География
 - 
			
Українська мова
 - 
			
Информатика
 - 
			
Українська література
 - 
			
Қазақ тiлi
 - 
			
Экономика
 - 
			
Музыка
 - 
			
Право
 - 
			
Беларуская мова
 - 
			
Французский язык
 - 
			
Немецкий язык
 - 
			
МХК
 - 
			
ОБЖ
 - 
			
Психология
 - 
			
Физкультура и спорт
 - 
			
Астрономия
 - 
			
Кыргыз тили
 - 
			
Оʻzbek tili
 
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			