Find the factorial of a number #java #factorial #program #coding #programming #java4quicklearning

preview_player
Показать описание
Find the factorial of a number #java #factorial #program #coding #programming #java4quicklearning

factorial of a number,factorial,python program to calculate factorial of a number,factorial of 0,python program to find factorial of a number,python program to find the factorial of a number,python factorial of a number,python program to find a factorial of a number,java program to find factorial of a number,0 factorial,find the factorial of a number,factorial program in python,factorial calculator,calculating the factorial of a number in python
Рекомендации по теме
Комментарии
Автор

Your consistency is inspiring—keep going

attaraltaf
Автор

You should start I with 2 because there is no point of multiply 1 by 1

hassanalgamdi
Автор

auto factorial = [](auto self, int n) -> long long {
return n < 2 ? 1 : n * self(self, n - 1);
};

okanakyuz-ew
Автор

there’s a return in there so it has to be a function, just not included in the screenshot. “n” is the argument the function uses so everything is fine as long as you call the function w a parameter

keisk
Автор

Now do it with n being float instead of int.

henami
Автор

If you multiply from top to bottom you save one multiplication.

jfsmachado
Автор

You never declared n, this would just return an error

yungbeanz_
Автор

You can just :

int fact(int n){
if(n < 1){
return 1;
}
return n * fact(n - 1);
}

DeseLoki-kmsu
Автор

n was not declared in this scope, or maybe you have made a function for finding the factorial and passed n as a argument to it hmm when I see it clearly you are returning a value so yeah it is a function so n was declared in this scope 😂

anaskhan
Автор

There is a better way . Try using dynamic programming approach😂

jebezoswald
Автор

I mean logic is correct, just the syntax of the loop is weird. Anyways I didn't get meme. Is it supposed to be wrong

ArnavSingh-by
Автор

But whats different in it i mean didn't we use the same logic too

ZaidgourikGouri
Автор

What's n, no declaration of variable n so error will be occur

Offical_ThomasShelby
join shbcf.ru