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
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
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
English,
2 months ago
Math,
2 months ago
Social Sciences,
5 months ago
English,
11 months ago
Math,
11 months ago