PYTHON

Write a Python program to find sum of all odd numbers between 1 to n.

n = int(input("Enter the Starting number :- ")) m = int(input("Enter the Ending number :- ")) odd = 0 while n< m: if n % 2!=0: odd = odd + n n=n+1 print("The number is Even....",odd)

OUTPUT…

Leave a Reply

Your email address will not be published. Required fields are marked *

sign up!

We’ll send you the hottest deals straight to your inbox so you’re always in on the best-kept software secrets.