Factorial Program in java in hindi

Factorial Program in java in hindi Hello दोस्तों! आज इस पोस्ट में आपको “Factorial Program in java in hindi ”  को पढ़ेंगे , इस पोस्ट को आप पूरा पढ़िए. इस article  को बहुत ही आसान और सरल भाषा में लिखा गया है. यह article  आपके exam के लिए बहुत उपयोगी साबित होगी. जो छात्र परीक्षा की तैयारी रहे हैं वो सभी इस article  की मदद से आप सभी आसानी से हिंदी भाषा में सीख सकते हैं| 

जावा में फैक्टोरियल प्रोग्राम हिंदी में(Factorial Program in java in hindi)

फैक्टोरियल प्रोग्राम Java में लिखने के लिए 1000 शब्दों की आवश्यकता नहीं होती है, क्योंकि यह काफी साधारण कार्यक्रम होता है जिसे कुछ ही कोड लाइनों में लिखा जा सकता है। फैक्टोरियल की गणना कैसे करें, और इसे Java में कैसे कोड करें, इसके बारे में मैं निम्नलिखित विस्तार में बताऊंगा |

Factorial Program in java in hindi
Factorial Program in java in hindi

फैक्टोरियल क्या है?(What is a factorial?)

फैक्टोरियल एक सकारात्मक पूर्णांक का गुणन करण का परिणाम होता है, जिसे आमतौर पर एक जरूरी गणकारक के रूप में प्रयोग किया जाता है। यदि हम किसी पूर्णांक ‘n’ का फैक्टोरियल निकालना चाहते हैं, तो वह होता है:

n! = n × (n-1) × (n-2) × … × 2 × 1

यहां उदाहरण के लिए, 5 का फैक्टोरियल निम्नलिखित रूप में होता है:

5! = 5 × 4 × 3 × 2 × 1 = 120

अब, हम इसका एक Java प्रोग्राम लिखेंगे |

import java.util.Scanner;

public class FactorialProgram
{
public static void main(String[] args)
{
Scanner scanner = new Scanner(System.in);

System.out.print(“Please enter an integer: “);
int number = scanner.nextInt();

scanner.close();
long factorial = calculateFactorial(number);

System.out.println(“Factorial of ” + number + “: ” + factorial);
}
public static long calculateFactorial(int n)
{
if (n == 0 || n == 1)
{
return 1;
}
else
{
long result = 1;
for (int i = 2; i <= n; i++)
{ result *= i; } return result;
}
}
}
इस प्रोग्राम में, हम स्कैनर (Scanner) का उपयोग करके प्रयोक्ता से एक पूर्णांक प्राप्त करते हैं। फिर हम calculateFactorial फ़ंक्शन को कॉल करते हैं जो फैक्टोरियल की मूल्य को पूर्णांक ‘number’ से गणना करता है और फिर परिणाम को प्रिंट करता है।
calculateFactorial फ़ंक्शन में, हम स्वतंत्रता या 1 के बराबर वापस लौटते हैं, क्योंकि 0 और 1 का फैक्टोरियल 1 होता है। अन्यथा, हम एक वर्ग गुणन का गणन करने के लिए एक फॉर लूप का उपयोग करते हैं, जो ‘i’ को 2 से लेकर ‘n’ तक बढ़ाता है, और परिणाम को गुणा करता है।
आप इस कोड को अपने कंप्यूटर पर रन करके किसी भी संख्या के फैक्टोरियल को प्राप्त कर सकते हैं। यह एक उदाहरण है कि कैसे Java में फैक्टोरियल प्रोग्राम लिखा जा सकता है।

Output

Please enter an integer: [user_input]
Factorial of [user_input]: [factorial_result]
Please enter an integer: 5
Factorial of 5: 120

You Minght Also like……C लैंग्वेज क्या है हिन्दी मे-C language in hindi & history of c language in hindi

जावा में फैक्टोरियल नंबर क्या है?

जावा में फैक्टोरियल नंबर (Factorial Number) किसी पूर्णांक के सभी पूर्ववर्गी पूर्णांकों का गुणन का मान होता है। ‘n’ के फैक्टोरियल को ‘n!’ से प्रकटित किया जाता है और यह ‘n’ के पूर्ववर्गी संख्याओं का गुणन करके प्राप्त किया जाता है, शुरुवात से लेकर 1 तक।
उदाहरण के लिए, 5 का फैक्टोरियल (5!) होता है:
5! = 5 × 4 × 3 × 2 × 1 = 120
इस तरह, किसी पूर्णांक का फैक्टोरियल मान प्राप्त किया जा सकता है जिससे उसके पूर्ववर्गी संख्याओं का गुणन किया जाता है।

100 फैक्टोरियल में कितने जीरो होते हैं?

100 फैक्टोरियल का सूचना निम्नलिखित रूप में होता है:
100! = 93326215443944152681699238856266700490715968264381621468592963895217599993229915608941463976156518286253697920827223758251185210916864000000000000000000000000
यहां 24 जीरो हैं जो इस लंबे संख्या के आगे हैं।

CONCLUSION :-

आज के इस आर्टिकल मे हमने आपको Factorial Program in java in hindi  के बारे मे विस्तार  से जाना  | अगर यह ARTICAL आप को पसंद आया हो तो इसे अपने दोस्तों  के साथ SHARE जरूर करे | आप हमे COMMENT के माध्यम से सुझाव दे सकते है आप हमे Email-id studentinsidelibarary013@gmail.com पर अपने सुझाव दे सकते है |

Factorial Program in java in hindi, Factorial Program in java in hindi

12 thoughts on “Factorial Program in java in hindi”

  1. Your blog is a constant source of inspiration for me. Your passion for your subject matter is palpable, and it’s clear that you pour your heart and soul into every post. Keep up the incredible work!

  2. Your blog is a testament to your dedication to your craft. Your commitment to excellence is evident in every aspect of your writing. Thank you for being such a positive influence in the online community.

  3. Just wish to say your article is as surprising The clearness in your post is just cool and i could assume youre an expert on this subject Fine with your permission allow me to grab your RSS feed to keep updated with forthcoming post Thanks a million and please keep up the enjoyable work

  4. Hello Neat post Theres an issue together with your site in internet explorer would check this IE still is the marketplace chief and a large element of other folks will leave out your magnificent writing due to this problem

  5. My brother recommended I might like this web site He was totally right This post actually made my day You cannt imagine just how much time I had spent for this information Thanks

  6. Real Estate naturally like your web site however you need to take a look at the spelling on several of your posts. A number of them are rife with spelling problems and I find it very bothersome to tell the truth on the other hand I will surely come again again.

Leave a Comment