#include <stdio.h>
#include <conio.h>
void main()
{
int fact=1,no;
clrscr();
printf("Enter the Number:-");
scanf("%d",&no);
ram:
fact=fact*no;
no=no-1;
if(no>1)
goto ram;
else
printf(" Factorial of a no=%d",fact);
getch();
}
#include <conio.h>
void main()
{
int fact=1,no;
clrscr();
printf("Enter the Number:-");
scanf("%d",&no);
ram:
fact=fact*no;
no=no-1;
if(no>1)
goto ram;
else
printf(" Factorial of a no=%d",fact);
getch();
}
No comments:
Post a Comment