Serenity
long doublefactorial(int n)
{
if (n < 0)
{
return 0; // verifying it is a positive integer
}
if (n == 1)
return 1; // base case
else
return factorial(n) / (doublefactorial(n - 1)); // the recursive call
}
Serenity
I need to have it turned into a tail-recursive function assuming I already have the factorial function at my disposal.
Ak
Hi... Frnzzz
Plss cand someone send me
Python or C language handmade nots
Anonymous
I too need notes
I just started b-tech in cse
Serenity
Mahdu do you have any suggestion ?
Serenity
The function below successfully calculates double factorial - n * (n-2) * (n-4) ...
Serenity
I need to convert it to a tail-recursive function as part of my assignment .
Serenity
And you can assume that the regular factorial function is implemented correctly as well so it does not have to bother you.
Serenity
Yes and using the factorial function as a helper function
Serenity
that is the point because I have already successfully implemented a tail recursive function that calculates double factorial but without the help of the regular factorial.
Serenity
I am kind of baffled because all the different exercises that are obviously about the same calculation at last
Serenity
Can anybody help me turn a regular recursive function into a tail recursive function ?
M.M.G.
👍
klimi
Hello sar, what is this?
Anonymous
Check out HaxorSecurity (Public): https://t.me/haxorsec
klimi
klimi
klimi
Alright see, it wasn't that hard to say what it is, dont post random YouTube links. Also I am not going to watch it.
klimi
We get tons of promotional videos here. I think you understand
klimi
Nah I just went thought the chat and there were few red flags of spam/promo
- yt link
- no previous messages
Anonymous
👍
Anonymous
Anonymous
https://abinashtalks.blogspot.com/2020/04/Client-and-Server-model.html?m=1
Anonymous
Joo
Please can someone tell me Any other istream apart from getline and cin
Joo
I see but i want to read an input from a user without using com or getline
Es
Please can one help me with code block
Joo
Im solving a question but both cin and getline doesnt work properly
Zildj1an
Just in case you want to give it a try
Zildj1an
https://www.reddit.com/r/linuxquestions/comments/g4pw7w/kernel_bug_unable_to_handle_kernel_paging_the/
Joo
Hihi
Joo
This is the problem
Lieutenant
We can share the pictures of our source code?!
klimi
Lieutenant
why picture?
Just asking. I thought you got warnings for sharing the code with which you're having difficulty with
Joo
I see ok
Joo
Joo
Hmmm
Zildj1an
So you say there are scenarios where a kernel page fault can happen
Zildj1an
What would you say is the most common case?
Zildj1an
Yes but you made a point about that it can happen (Well, otherwise it would not be happening to me hehe) . Thanks!
Errol
Hello guys, what IDE or text editor are you using to programme in C?? I need one to have a terminal guys
Zildj1an
Dima
#ide
Joo
Ok
Joo
But getline doesnt work when it's below cin
Joo
Wooow i see
Errol
how much knowledge is considered at least enough for Embedded C Programming? A lot or just grasp the basic?
klimi
klimi
Alion🦁
Palinuro
Harsh
Harsh
Visual Studio is really cool too
Alion🦁
But now I'm going to install it 👍💙
Alion🦁
What about code blocks?
Alion🦁
I think, It's deprecated too
Harsh
Alion🦁
So, even I installed compiler and My Hands were IDE
Alion🦁
And, BTW, I use KaliLinux. 😋 it's very good.
Think, my little's ram is 8gb. I gave 2gb to Kali and 6gb remained for Windows 10. And Kali is faster than Windows 10😃.
And, plus, just one command and all compilers are in my machine (in Kali) but windows, I have to download setup or any stuff
Dima
Lmao
Dima
This is funny
Prosvetlennii Dimas
Help me pls. I need to create vector of interface class and push_back to it a class derived from that interface class
Prosvetlennii Dimas
what do u mean shared_ptr???
Prosvetlennii Dimas
like pointers in C?
Prosvetlennii Dimas
thx
Dima
Alion🦁
🤔?
Harsh