Program to print all even numbers between 1 to 100 using while loop.

Code:

maximum = int(input("Please Enter the Maximum Value : "))

for number in range(1, maximum+1):

    if(number % 2 == 0):

        print("{0}".format(number), end=" ")

 

Output:

Comments

Popular posts from this blog

State use of pep and pip