#include <stdio.h>
/* Program to check number is prime or not
using goto statement.

Prime numbers have only 2 factors
1 and itself. */
void main()
{
int n=2,x=16,prime=1;
repeat:
if(x%n==0){
prime=0;
}
n++;
if(n<x) goto repeat;
if(prime==0){
printf(“The number is not a prime number.”);
}else{
printf(“The number is a prime number.”);
}

}

 

For Life time valid video tutorials of “C Programming For Beginners” course with quiz and certification : Click Here

Downloadable video tutorials of “C Programming For Beginners” for TTRC Player : Click Here