C program to print all numbers from N to 1 using goto statement
Given the value of N and we have to print all number from N to 1 using C program.
goto is a jumping statement, which transfers the program’s control to specified label, in this program we will learn how to print all numbers from N to 1, N is the limit of the series which will be given by the user.
Example:
Input:
Enter limit (value of N): 10
Output:
10 9 8 7 6 5 4 3 2 1
Program to print numbers from N to 1 using goto
Output
This is how we can print numbers from given range to 1 using goto statement? If you liked or have any issue with the program, please share your comment.
need an explanation for this answer? contact us directly to get an explanation for this answer