Computer Science, asked by Mack9837737, 5 months ago

Write a program to take two integers as input and output their sum.Sample Input:2,8
Sample Output:
10
Answer (Python)

Answers

Answered by anushka070603
19

Answer:

hi,

Explanation:

#program to take two integers as input and output their sum

a=int(input("enter the number"))

b=int(input("enter the number"))

sum=a+b

print(sum)

________________________

:)

Answered by varshamittal029
3

Concept:

input( ) function can be used to ask a user to type information into the program and save it in a variable that the computer can process.

The print() function prints a message to the screen or another standard output device.

Given:

Sample Input:2,8

Sample Output:

10

Program:

Write a program to take two integers as input and output their sum.

Solution:

a=int(input("Enter the first number:"))

b=int(input("Enter the second number:"))

sum=a+b

print("The sum of given numbers is",sum)

Output:

Attachments:
Similar questions