# Print even numbers from 1 to 100

##### *2019-11-19 15:40*

Write a C program to print all even numbers from 1 to n using for loop. Logic to print all even numbers using in given range in C programming. Learn C programming, Data Structures tutorials, exercises, examples, programs, hacks, tips and tricks online.We called a number as an even number when it is divisible by 2. So when you want to print the even numbers from 1 to 100 you have to check every number between the range that it print even numbers from 1 to 100

I am a beginner and I am stuck on this problem, Write a python code that uses a while loop to print even numbers from 2 through 100. Hint ConsecutiveEven differ by 2. Here is what I came up with so far: while num in range(22, 101, 2): print(num)