Program to find the sum of natural numbers from m to n, where m and n are input by the user in loop. useless answer will be report
Answers
Answered by
2
Answer:
#python
n = int(input("value of n = "))
m = int(input(" value of m = "))
total = 0
for i in range(n, m+1):
total += i
print("sum = ",total)
Similar questions