Ticker

6/recent/ticker-posts

LET'S SEE THE FACTORIAL PROGRAME USING LOOP IN C PROGRAMMING

 LET'S SEE THE FACTORIAL PROGRAME USING LOOP IN C PROGRAMMING


  1. #include<stdio.h>  
  2. int main()    
  3. {    
  4.  int i,fact=1,number;    
  5.  printf("Enter a number: ");    
  6.   scanf("%d",&number);    
  7.     for(i=1;i<=number;i++){    
  8.       fact=fact*i;    
  9.   }    
  10.   printf("Factorial of %d is: %d",number,fact);    
  11. return 0;  
  12. }   

Opt:-
 




Post a Comment

1 Comments

HEMU THE SMART said…
YOU ARE SO SMART HEMANTH