enter any five numbers and calculate and print sum and product of there numbers? Programming?
Answers
Answered by
3
The following program is written in python :-
a = int(input ("Enter 1st number: "))
b = int(input ("Enter 2nd number: "))
c = int(input ("Enter 3rd number: "))
d = int(input ("Enter 4th number: "))
e = int(input ("Enter 5th number: "))
print("There sum is ", a+b+c+d+e)
print ("There product is ", a*b*c*d*e)
Explanation :-
- Firstly take 5 numbers from user as an input in the form of an integer. int() function converts the input value in integer form, store all the values in different variables.
- Now print the sum of these numbers.
- Now you can print product of these numbers.
- + is an operator for sum and * is an operator for product.
Similar questions