factorial (loop)

 #include<stdio.h>

int main(){
  int i,f=1,num;
 
  printf("Enter a number: ");
  scanf("%d",&num);
 
  for(i=1;i<=num;i++)
      f=f*i;
 
  printf("Factorial of %d is: %d",num,f);
  return 0;
}

AVI.PARADOX..

Welcome to my blog! My name is PARADOX, and I’m thrilled to have you here., From the first “Hello, World!”.As a passionate coder, I find joy in the logic and structure of coding., This blog is more than just a collection of articles. It’s a community for those who love to gain knowledge as much as I do., So whether you’re here to learn something new, share your own knowledge, or just to be part of the community, I’m glad you’re here.

Post a Comment

Previous Post Next Post

Contact Form