Technology has advanced to the point where programming has become an essential part of our lives. We use software and applications for communication, entertainment, education, and work, and these are all built on programming languages.

Program to print first 9 natural numbers using For loop


Here, I have used Dev C++ platform, it is easy to download. In this program, integer "i" is declared. For Loop has been used initiating i from 1 and print the value of i in each loop increasing value of i by 1 until given condition becomes false ie, i<10.

Output


Exercise
Print natural numbers from 10 to 30 using For Loop.

Give your answer in comment section.
Share:

No comments:

Post a Comment

If you have any doubt, let me know...

Translate

Wikipedia

Search results