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 'n' numbers using for loop


Explanation

Here, in the program, two variables are used n and i. n stores number inputted by user and "i" is used as loop. As the loop increment it will print the value of i until it becomes greater than number stored in n.


Output


Exercise
Make a program that will print "*" for n times using for loop.
Share:

No comments:

Post a Comment

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

Translate

Wikipedia

Search results