C program to print EVEN numbers from 1 to N using while loop
belongs to collection: C programming Looping (while, do while, for) programs
All Answers
total answers (1)
belongs to collection: C programming Looping (while, do while, for) programs
total answers (1)
Program to print EVEN numbers from 1 to N using while loop
Output
Another way to print EVEN numbers from 1 to N
Since, we know that EVEN numbers starts from 2 and EVEN numbers are those numbers which are divisible by 2. So, we can run a loop from 2 to N by increasing the value of loop counter by 2.
Consider the given code...
need an explanation for this answer? contact us directly to get an explanation for this answer