Write a python program to calculate the sum of numbers from m to n.PROGRAM:m=int(input("Enter m value:"))n=int(input("Enter n value:"))i=0while (m<=n): i=i+m m=m+1 print("Sum= ",i)OUTPUT:Sum= 42
No comments:
Post a Comment