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


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

var a,i:integer;
begin
a:=1;
for i:=1 to 10 do
begin
a:=a*i;
end;
write(a);
end.



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 #includeint 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.


Топ вопросов за вчера в категории Информатика
Последние заданные вопросы в категории Информатика
-
Математика
-
Литература
-
Алгебра
-
Русский язык
-
Геометрия
-
Английский язык
-
Химия
-
Физика
-
Биология
-
Другие предметы
-
История
-
Обществознание
-
Окружающий мир
-
География
-
Українська мова
-
Информатика
-
Українська література
-
Қазақ тiлi
-
Экономика
-
Музыка
-
Право
-
Беларуская мова
-
Французский язык
-
Немецкий язык
-
МХК
-
ОБЖ
-
Психология
-
Физкультура и спорт
-
Астрономия
-
Кыргыз тили
-
Оʻzbek tili