Thursday, 5 July 2018

Prog-2 Write a program to read the value of two numbers and find their sum.

Algorith
Input
1. a
2. b
Output
1. sum
Method
1.start
2. Read a and b
3. Write a and b
4. sum = a + b
5. write sum
6. stop

Example:
a=5
b=7
Sum of a and b= 12

#python program to read the value of two numbers and find their sum.
a=int(input("Enter a number:")
b=int(input("Enter b number:")
sum=a+b
print("Sum of a and b=",sum)



No comments:

Post a Comment