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
Post a Comment