---
title: "Discussion on \"Factorial of a number\" | Hashnode"
description: "Discussion on \"Factorial of a number\". Factorial of a non-negative number is the multiplication of all positive numbers that are smaller than are equal to n.\nFormula: n! = n*(n-1)\\(n-2)*... 2\\1\nn=5 => 5*4*3*2*1\nn=5 => 1*2*3*4*5\nfactorial of 5 is 120\n0! = 1\nFactorial using for loop:\npublic..."
url: "https://hashnode.com/posts/factorial-of-a-number/6554b1428a06110e9c48e1a2"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Factorial of a number](https://sirishachallagiri.hashnode.dev/factorial-of-a-number?utm_source=hashnode&utm_medium=feed)

Factorial of a non-negative number is the multiplication of all positive numbers that are smaller than are equal to n. Formula: n! = n\*(n-1)\\(n-2)\*... 2\\1 n=5 => 5\*4\*3\*2\*1 n=5 => 1\*2\*3\*4\*5 factorial of 5 is 120 0! = 1 Factorial using for loop: public...

Nov 15, 2023 · 2 min read · sirishachallagiri.hashnode.dev  
Read the article

-   [#java](https://hashnode.com/tag/java)
-   [#factorial](https://hashnode.com/tag/factorial)
-   [#recursion-in-programming](https://hashnode.com/tag/recursion-in-programming)
-   [#coding](https://hashnode.com/tag/coding)
-   [#codewithexplanation](https://hashnode.com/tag/codewithexplanation)

## Written by

[Sirisha Challagiri](https://hashnode.com/@Siri2316)

@Siri2316

  
[View profile](https://hashnode.com/@Siri2316)

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
