Вопрос задан 15.02.2019 в 07:25. Предмет Информатика. Спрашивает Сидорук Влад.

Написать программу, вывод на экран последовательность из 10 чисел каждое из которых на 3 больше

предыдущего.
0 0
Перейти к ответам

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

Внимание! Ответы на вопросы дают живые люди. Они могут содержать ошибочную информацию, заблуждения, а также ответы могут быть сгенерированы нейросетями. Будьте внимательны. Если вы уверены, что ответ неверный, нажмите кнопку "Пожаловаться" под ответом.
Отвечает Болатов Куаныш.
Program enot;
Var b,j,i: integer;
begin
read(b);
for j:=1 to 9 do
begin
b:=b+3;
writeln(b);
end;
end.
0 0
Отвечает нейросеть ChatGpt. Будьте внимательны, ответы нейросети могут содержать ошибочные или выдуманные данные.

Writing a Program to Display a Sequence of Numbers

To write a program to display a sequence of 10 numbers, each of which is 3 more than the previous one, you can use a simple loop to generate the numbers. Here's a Python program to achieve this:

```python # Initialize the first number in the sequence current_number = 1

# Display the sequence of 10 numbers for _ in range(10): print(current_number) current_number += 3 # Increment the current number by 3 for the next iteration ```

This program initializes the first number as 1 and then uses a loop to print the current number and increment it by 3 for the next iteration.

Output

The output of the program will be: ``` 1 4 7 10 13 16 19 22 25 28 ```

This sequence starts with 1 and each subsequent number is 3 more than the previous one.

Please let me know if you need further assistance or if there's anything else I can help you with!

0 0

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

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

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