Day 27: Factorial of N Numbers of 100DaysCodingChallenge

Hello all, 

I have started the 100 days of coding challenge to improve my programming skills..

Today is the Day27 of 100DaysCodingChallenge for 

Factorial of N Numbers input Numbers taken by the user.

Code : 

let n = prompt("Enter N : ");
let f = 1;
for (let i = 1; i <= n; i++) {
  f = f * i;
}
console.log("The Factorial of ", n, "is ", f);

Output :     

 


Happy Coding:)

Comments

Popular posts from this blog

Day 55: Pattern using loops of 100DaysCodingChallenge

Day 7: Square or Power Integer Numbers of 100DaysCodingChallenge

Day 45: Pattern using loops of 100DaysCodingChallenge