Предмет: Информатика, автор: nmarcuk690

Напишіть програму, яка знаходить суму, добуток та середнє арифметичне трьох
цілих чисел, введених із клавіатури. Наприклад, при введенні чисел 4, 5 та 7 ми
повинні отримати відповідь
4 + 5 + 7 = 16, 4 * 5 * 7 = 140, (4 + 5 + 7) / 3 = 5.333333

Ответы

Автор ответа: TheEpic73
1

numbers = list(map(int, input("Numbers: ").split(", ")))

product = 1

for i in numbers:

   product *= i

print(f"{numbers[0]} + {numbers[1]} + {numbers[2]} = {sum(numbers)}, {numbers[0]} * {numbers[1]} * {numbers[2]} = {product}, ({numbers[0]} + {numbers[1]} + {numbers[2]}) / 3 = {sum(numbers)/3}")

Автор ответа: Аноним
1

a = int(input())

b = int(input())

c = int(input())

print(a + b + c)

print(a * b * c)

print((a + b + c) / 3)

Похожие вопросы
Предмет: Английский язык, автор: ahoroshko19
Once there was a king who told some of his workers to dig a pond. The pond was dug, the king said that one person from each household has to bring a glass of milk during the night and pour it into the pond. So the pond should be full of milk by the morning. One man decided not to take the milk to the pond. He thought that since everyone would bring milk, he could just take a glass of water. Because it will be dark at night, no one will notice. So he went and poured the water into the pond. In the morning, the king came to visit the pond and to his surprise the pond was only filled with water! What had happened was that everyone was thinking like the other man that I don't have to put the milk, someone else will do it». Dear friends, when you have a responsibility, do not think that others will take care of it. Rather, it starts from you, if you don't do it, no one else will do it. So, change yourself and that will make a difference. 1. Choose the correct title for the text. a) All is well that ends well. b) An early bird catches the worm. c) What is done by night appears by day. d) Never put off till tomorrow what you can do today. 2. Put the sentences into the correct order. a) People received the command and went home. b) In the morning, the king found out that the pond was full of water c) The king announced that at night one person from each house- hold had to pour a glass of milk into the pond. d) One man poured water instead of milk into the pond. e) The king ordered to dig a pond.