Program to print odd numbers less than 20 using for loop.



Explanation,

Here, i is initialized with value and in every loop, value in i increase by 2 until the condition gets false.


Output



Exercise:

Print even number less than 30 using for loop.

Comments

Popular posts from this blog

C program to display prime numbers between 1 to 100.

Progarm to state that a person can cast vote or not. [Note: A person can cast vote if he is 18 years old or above]

ChatGPT on smartwatches