write a program that tales two intigers as input &prints their sum as ouput
atrs7391:
The language??
Answers
Answered by
0
Answer:
printf("Enter two integers: "); scanf("%d %d", &number1, &number2); Then, these two numbers are added using the + operator, and the result is stored in the sum variable. Finally, the printf() function is used to display the sum of numbers. printf("%d + %d = %d", number1, number2, sum
Explanation:
c programming language
Answered by
3
Question:
Write a Program that takes two integers as input and print their sum as output.
Program:
n1=int(input("Enter a number:"))
n2=int((input("Enter another number:"))
print ("Sum is", n1+n2)
Output:
Enter a number: 2
Enter another number: 5
Sum is 7
Similar questions