IDNLearn.com is your trusted platform for finding reliable answers. Find the answers you need quickly and accurately with help from our knowledgeable and dedicated community members.


Write a program that takes three numbers and prints their sum. Every
number is given on a separate line.


Sagot :

Answer:

This solution is implemented in python

num1 = float(input("Number 1: "))

num2 = float(input("Number 2: "))

num3 = float(input("Number 2: "))

print("Sum: "+str(num1+num2+num3))

Explanation:

This line prompts the user for the first number

num1 = float(input("Number 1: "))

This line prompts the user for the second number

num2 = float(input("Number 2: "))

This line prompts the user for the third number

num3 = float(input("Number 2: "))

This calculates and prints the sum

print("Sum: "+str(num1+num2+num3))