// Program To Find Out The Factorial Of Any Natural Number
let fact = 1;
let ani = prompt("Enter The Number...")
ani = Number.parseInt(ani)
//console.log(typeof ani)
for (let i = 1; i <= ani; i++) {
fact *= (i*1)
}
/*for (let i = 1; i < ani; i++) {
fact *= (i+1)
}*/
console.log("The Factorial Of First " + ani + " Number Is " + fact)
top of page
bottom of page