No products in the cart.

Write a programme to find factorial …

CBSE, JEE, NEET, CUET

CBSE, JEE, NEET, CUET

Question Bank, Mock Tests, Exam Papers

NCERT Solutions, Sample Papers, Notes, Videos

Write a programme to find factorial of a given number using for loop
  • 1 answers

Preeti Dabral 3 years, 5 months ago

  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. }   
http://mycbseguide.com/examin8/

Related Questions

myCBSEguide App

myCBSEguide

Trusted by 1 Crore+ Students

Test Generator

Test Generator

Create papers online. It's FREE.

CUET Mock Tests

CUET Mock Tests

75,000+ questions to practice only on myCBSEguide app

Download myCBSEguide App