No products in the cart.

Program to print factorial of a …

CBSE, JEE, NEET, CUET

CBSE, JEE, NEET, CUET

Question Bank, Mock Tests, Exam Papers

NCERT Solutions, Sample Papers, Notes, Videos

Program to print factorial of a number
  • 1 answers

Vishwakarmaji Vishwakarmaji 5 years, 10 months ago

Let limit is 0 or say x>0 then int x=5,fact=1; while (x>0) { fact=fact*x; x=x-1; } System.out.println (fact); First time x=5 ×=4 ×=3 ×=2 ×=1 each time fact is multiplied by x and update value of fact So in this case factorial of 5 is 120
http://mycbseguide.com/examin8/

Related Questions

Founder of python
  • 2 answers

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