मराठी

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×