Saturday 1 April 2017

Algorithm to Calculate Factorial of A Number


Step 1 : Start
Step 2 : Read Number ,Set i = 1, Factorial = 1
Step 3 : if  i < = Number then go to Step 4
             else go to Step 7
Step 4 : Factorial = Factorial * i
Step 5 : Increment i 
Step 6 : go to Step 3
Step 7 : Print Factorial
Step 8 : Stop 

No comments:

Post a Comment

How to Invert an SVG image using CSS ?

You can invert your svg easily by using following css code svg { -webkit-filter: invert(100%); /* safari 6.0 - 9.0 */ filter...