Natural Number

Natural number एक integer होता है जो की 0 से बड़ा होता है। Natural numbers की शुरुवात होती है 1 से और ये लगातार increment होती रहती है infinity तक : 1, 2, 3, 4, 5 … इत्यादि.

Natural numbers को “counting numbers” भी कहा जाता है क्यूंकि उनका इस्तमाल counting करने के लिए किया जाता है. उदाहरण के लिए, अगर आप किसी चीज़ को timing करते हैं seconds में, तब ऐसे में आपको natural numbers (usually ये शुरू होता है 1 से) का इस्तमाल करना चाहिए।

जब इन्हें लिखा जाता है, natural numbers में कोई भी decimal point (चूँकि ये integers होते हैं) नहीं होते हैं, लेकिन large natural numbers में commas शामिल होता है, e.g. 1,888 and 232,892,800. Natural numbers में कभी भी एक minus symbol (-) नहीं होता है क्यूंकि ये कभी भी negative नहीं हो सकते हैं.

Computer science में, natural numbers का commonly इस्तमाल किया जाता है जब values को increment किया जा रहा हो. उदाहरण के लिए, एक for loop में, counter अक्सर increase होती है 1 से वो भी प्रत्येक iteration में।

एक बार counter hit करती है limit को (e.g., 10 यहाँ पर for (i=1; i<10; i++)), तब loop टूट जाता है और code जो की loop के बाद होता है वो processed होता है.

« Back to Wiki Index