Answers for "How to get a factorial number"

0

write a program to find factorial of a number

#include<stdio.h>
int main()
{
int i,fact=1,number;
printf("Enter a number: ");
scanf("%d",&number);
for(i=1;i<=number;i++){
fact=fact*i;
Posted by: Guest on March-14-2021
0

How to get a factorial number

//This is how you can make a factorial out of the number that the user has given
const factorial = (number) =>{
	let result = 1
    for(let i = 1; i<=number;i++){
    	result = result*i
    }
  	return console.log(result)
  }
Posted by: Guest on May-18-2021

Code answers related to "How to get a factorial number"

Code answers related to "Javascript"

Browse Popular Code Answers by Language