C program to print ODD 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 ODD numbers from 1 to N using while loop
Output
Another way to print ODD numbers from 1 to N
Since, we know that ODD numbers starts from 1 and ODD numbers are those numbers which are not divisible by 2. So, we can run a loop from 1 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