algorithm to input percentage from user and print grade
September 24, 2022

Algorithm to print the series 1 to N using for loop

In this tutorial, we are going to write an algorithm to print the series 1 to N using for loop. using this algorithm we can write a program to print the series 1 to N using for loop in most programming languages like C, C++, Java, and Python programming language.


Algorithm to print the series 1 to N using for loop.

1. Read N.
2. Repeat Step 3 for I:=1 to N:
3.     Write I.
4. [End of Step 2 loop]
5. Exit.

In the above-given Algorithm, we first read a variable value N after that we repeat step 3  using the loop means we will write the value of I from 1 to N using the loop. and this step 3 will repeat till the value of I has become equal to N. after that we will exit from the program.

Leave a Reply

Your email address will not be published. Required fields are marked *