Computer Science, asked by anuragkumarSwag5550, 7 months ago

write a program in python to input three numbers and print their sum

Answers

Answered by ansarahmadansari68
27

Explanation:

number1 = int(input('Enter the first number:'))

number2 = int(input('Enter the second number:'))

number3 = int(input('Enter the third number:'))

print('The total of the three numbersis:',number1+number2+number3)

Answered by purveshKolhe
6

\bf{\underline{Answer::}}

num1 = int(input()) # Line 1

num2 = int(input()) # Line 2

num3 = int(input()) # Line 3

print(num1 + num2 + num3) # Line 4

\rule{300pt}{0.2em}

\bf{\underline{Logic::}}

Line 1: This line prompts user to enter an integer and store it in a variable called num1.

Line 2: This line prompts user to enter another integer and store it in a variable called num2.

Line 3: This line prompts user to enter third integer and store it in a variable called num3.

Line 4: This line prints the sum using the print() function.

\rule{300pt}{0.2em}

Similar questions