Edu
 
 

Home | Programming | Block diagram

Factorial Diagram

N factorial is represented as N! where the exclamation point means factorial. For example,

1! = 1
2! = 1*2 = 2
3! = 1*2*3 = 6
4! = 1*2*3*4 = 24
...
N! = 1*2*3...*N

N is an integer and is the input to the flowchart. This flowchart has a loop that starts with M = 1 and increments M until M equals the inputted value N. This program calculates N! by doing each multiplication. Since a computer can rapidly do calculations, it can implement a brute force solution rather than having to rely on a more elegant one.
Download pdf file:
   Author: Anahit Grigoryan


Paper size:
                         

   English
 
 
Copyright © 2013     EduGnosis.com     All Rights Reserved.