728x90 AdSpace

Latest Article

Write a factorial Program in C C++ Programming Language




Write a factorial Program in C C++ Programming Language Simple code using For Loop



#include<stdio.h>
#include<conio.h>
int factorial(int i)
{
    int k;
    for(; i<=k; i++)
        k=i*k;
 return k;
}
void main()
{
   int fact,a;
   clrscr();
   printf("enter the number");
   scanf("%d",&a);
   fact=factorial(fact);
   printf("%d",fact);
   getche();
}

no image
  • Title : Write a factorial Program in C C++ Programming Language
  • Posted by :
  • Date : 07:33
  • Labels :





  • Blogger Comments
  • Facebook Comments

0 comments:

Post a Comment

Top