Even numbers Title: Even numbers up to given number Program: n=int(input("Enter n value\n")) for i in range(1,n+1): if(i%2==0): print(i) Output: Enter n value 20 2 4 6 8 10 12 14 16 18 20 Share Get link Facebook X Pinterest Email Other Apps Share Get link Facebook X Pinterest Email Other Apps Comments
Comments
Post a Comment