Вопрос задан 16.11.2023 в 03:21. Предмет Информатика. Спрашивает Андреева Кристина.

1. n := 1; s := 0; while n <= 80 do begin s := s + 10; n := n * 3 end; write(s); 2. n := 1; s

:= 20; while n <> 5 do begin n := n + 1; s := s - 5; end; write(s); 3. n := 1; s := 1; while n <= 80 do begin s := s * 2; n := n + 20 end; write(s); 4. n := 0; s := 0; while n + s <= 50 do begin s := s + 5; n := n + 10; end; write(s); 5. n := 0; s := 120; while n < 5 do begin s := s div 2; n := n + 1; end; write(s); 6. n := 1; s := 0; while n < 5 do begin s := s + n; n := n + 1; end; write(s); 7. n := 1; s := 0; while n < 5 do n := n + 1; s := s + n; write(s); Ребят если не сделаю полосу плохую оценку, прошу пожалуйста, хотя бы на 4
0 0
Перейти к ответам

Ответы на вопрос

Внимание! Ответы на вопросы дают живые люди. Они могут содержать ошибочную информацию, заблуждения, а также ответы могут быть сгенерированы нейросетями. Будьте внимательны. Если вы уверены, что ответ неверный, нажмите кнопку "Пожаловаться" под ответом.
Отвечает Галимов Камиль.

Ответ:

50

0

16

20

3

10

9

Объяснение:

0 0
Отвечает нейросеть ChatGpt. Будьте внимательны, ответы нейросети могут содержать ошибочные или выдуманные данные.

1. The first code snippet initializes two variables, `n` and `s`, with the values of 1 and 0, respectively. It then enters a while loop that continues as long as `n` is less than or equal to 80. Inside the loop, `s` is incremented by 10, and `n` is multiplied by 3. Finally, the value of `s` is printed. The output of this code snippet would be 810.

2. The second code snippet initializes `n` and `s` with the values of 1 and 20, respectively. It then enters a while loop that continues as long as `n` is not equal to 5. Inside the loop, `n` is incremented by 1, and `s` is decremented by 5. Finally, the value of `s` is printed. The output of this code snippet would be 5.

3. The third code snippet initializes `n` and `s` with the values of 1 and 1, respectively. It then enters a while loop that continues as long as `n` is less than or equal to 80. Inside the loop, `s` is multiplied by 2, and `n` is incremented by 20. Finally, the value of `s` is printed. The output of this code snippet would be 1048576.

4. The fourth code snippet initializes `n` and `s` with the values of 0 and 0, respectively. It then enters a while loop that continues as long as the sum of `n` and `s` is less than or equal to 50. Inside the loop, `s` is incremented by 5, and `n` is incremented by 10. Finally, the value of `s` is printed. The output of this code snippet would be 55.

5. The fifth code snippet initializes `n` and `s` with the values of 0 and 120, respectively. It then enters a while loop that continues as long as `n` is less than 5. Inside the loop, `s` is divided by 2, and `n` is incremented by 1. Finally, the value of `s` is printed. The output of this code snippet would be 15.

6. The sixth code snippet initializes `n` and `s` with the values of 1 and 0, respectively. It then enters a while loop that continues as long as `n` is less than 5. Inside the loop, `s` is incremented by `n`, and `n` is incremented by 1. Finally, the value of `s` is printed. The output of this code snippet would be 10.

7. The seventh code snippet initializes `n` and `s` with the values of 1 and 0, respectively. It then enters a while loop that continues as long as `n` is less than 5. Inside the loop, `n` is incremented by 1, and `s` is incremented by `n`. Finally, the value of `s` is printed. The output of this code snippet would be 15.

Please let me know if you need any further clarification or assistance!

0 0

Похожие вопросы

Топ вопросов за вчера в категории Информатика

Последние заданные вопросы в категории Информатика

Задать вопрос