Sunday, 8 September 2019

How to write a program to find the factorial of given numbers?

#include<stdio.h>
#include<conio.h>
void main()
{
  int I, n, f;
  clrscr(); 
  printf("Enter the number ");
  scanf("%d",&n);
   While(i<= n)
   {
      f= f*i;
      i++
   }
  printf(" The factorial if the number is=% d\n",n, f);
getch();
}





No comments:

Post a Comment