हिंदी

Write pseudocode to calculate the factorial of a number (Hint: Factorial of 5, written as 5! = 5 × 4 × 3 × 2 × 1). - Computer Science (Python)

Advertisements
Advertisements

प्रश्न

Write pseudocode to calculate the factorial of a number (Hint: Factorial of 5, written as 5! = 5 × 4 × 3 × 2 × 1).

टिप्पणी लिखिए

उत्तर

Input number
Set Factorial = 1
For i in range ( 1, number + 1) :
       Factorial *= I

Print factorial
shaalaa.com
Representation of Algorithms - Pseudocode
  क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
अध्याय 4: Introduction to Problem Solving - Exercise [पृष्ठ ८५]

APPEARS IN

एनसीईआरटी Computer Science [English] Class 11
अध्याय 4 Introduction to Problem Solving
Exercise | Q 15. | पृष्ठ ८५
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×