C program to print square and cube of all numbers from 1 to N using goto statement
Given the value of N and we have to print square and cube of all numbers between 1 to N using C language goto statement.
goto is a jumping statement, which transfers the program’s control to specified label, in this program, we are going to read the value of N and printing the square, cube of all numbers between 1 to N.
Program to print Square and Cube of all numbers from 1 to N using goto in C
Output
This is how we can find the square and sum from 1 to N, 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