n=int(input("Enter n value:")) sum=0 for i in range(1,n+1,2): sum+=i print(sum)
To embed this project on your website, copy the following code and paste it into your website's HTML: