#include <stdio.h>
/* Program to find factorial of any number
using goto statement. */
void main()
{
// 5 * 4 * 3 * 2 * 1 = 120
int fact=1,x=7,y;
y=x;
repeat:
//fact = fact * x;
//x = x – 1;
fact *= x–;
if(x>1) goto repeat;
printf(“Factorial of %d is : %d”,y,fact);
}

 

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