Write a python program to find the sum of 'n' given inputs
Answers
Answered by
0
Answer:
num = int(input("Enter a number: "))
if num < 0:
print("Enter a positive number")
else:
sum = 0.
# use while loop to iterate un till zero.
while(num > 0):
sum += num.
Similar questions
Math,
2 months ago
English,
4 months ago
English,
10 months ago
Hindi,
10 months ago
Computer Science,
10 months ago