Write a program to print multiples of 5 from 5 to 50.
(By using GOTO statement)
Answers
Answered by
0
Answer:
#include <stdio.h>
int main()
{
int counter=1;
int n;
//enter the value of n (range)
printf("Enter the value of n: ");
scanf("%d",&n);
//define label
START:
printf("%d ",counter);
counter++; //increment counter
//condition & goto statement
if(counter<=n)
goto START;
return 0;
}
Similar questions