Вопрос задан 13.10.2018 в 05:24. Предмет Информатика. Спрашивает Скрипкин Андрей.

Составить программу вычисления произведения чисел от 1 до 10

0 0
Перейти к ответам

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

Внимание! Ответы на вопросы дают живые люди. Они могут содержать ошибочную информацию, заблуждения, а также ответы могут быть сгенерированы нейросетями. Будьте внимательны. Если вы уверены, что ответ неверный, нажмите кнопку "Пожаловаться" под ответом.
Отвечает Nurlanov Nurislam.
На паскале вот так:
var a,i:integer;
begin
a:=1;
for i:=1 to 10 do
begin
a:=a*i;
end;
write(a);
end.
0 0
Отвечает нейросеть ChatGpt. Будьте внимательны, ответы нейросети могут содержать ошибочные или выдуманные данные.

Program to Calculate the Product of Numbers from 1 to 10

To calculate the product of numbers from 1 to 10, you can use various programming languages. Here are a few examples in different languages:

# Python:

```python product = 1 for i in range(1, 11): product *= i print("The product of numbers from 1 to 10 is:", product) ``` Output: ``` The product of numbers from 1 to 10 is: 3628800 ```

# C:

```c #include

int main() { int product = 1; for (int i = 1; i <= 10; i++) { product *= i; } printf("The product of numbers from 1 to 10 is: %d\n", product); return 0; } ``` Output: ``` The product of numbers from 1 to 10 is: 3628800 ```

# JavaScript:

```javascript let product = 1; for (let i = 1; i <= 10; i++) { product *= i; } console.log("The product of numbers from 1 to 10 is:", product); ``` Output: ``` The product of numbers from 1 to 10 is: 3628800 ```

Please note that these are just a few examples, and there are many other programming languages you can use to calculate the product of numbers from 1 to 10. The choice of language depends on your preference and the requirements of your project.

Remember to adjust the code accordingly if you want to calculate the product of numbers in a different range.

I hope this helps! Let me know if you have any further questions.

0 0

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

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

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