Anonymous
k
Serenity
I couldn't find a solution to my recursive problem.
Serenity
Can anyone help me with that ?
Francisco
Can anyone help me with that ?
What have you done? Some code maybe?
Serenity
Yes I have written a code.
Serenity
I'll share it with you, just tell me if I am in the right direction.
Serenity
Taylor Rose
hello everyone ... need help with cryptography,advise the book, namely in the 'encryption hierarchy'?
Francisco
I'm missing information, why don't you send the full funcion?
Serenity
The desired outcome should roughly converge to 1.75..
Serenity
Just a second I'll upload the entire task
Serenity
This is what I am asked to do.
Serenity
And N is an integer provided by the user.
Serenity
so it's a finite sum and there is no need to be concerned about memory stuff and all that...
Francisco
This is what I am asked to do.
Not this. Send all the code you've written
Serenity
Okay.
Serenity
#define _CRT_SECURE_NO_WARNINGS #include <stdio.h> #include <math.h> // NOTE: Since <math.h> is included, you can use sqrt() to calculate the square-root of a number. double repetitiveroot(int n) { if (n == 1) return 1; return sqrt(n) + sqrt(repetitiveroot(n-1));// the recursive call } // HERE: DEFINE THE RECURSIVE FUNCTION THAT CALCULATES THE VALUE OF THE EXPRESSION GIVEN IN THE HW int main() { int n; double res; printf("Please enter a number:\n"); scanf("%d", &n); if (n < 0) return 0; res = repetitiveroot(n); // recursive function call printf("Result = %lf", res); return 0; }
Anonymous
just writing this on paper as a mathematical function should tell you that you are wrong. this is why i asked you to read some lecture pdfs on recursion instead of giving you a solution in code.
Serenity
I am new to recursion and this type of questions is quite heavy on me
Serenity
So I need to some sort of boost and practical guidance in order to deal with recursion
Anonymous
So I need to some sort of boost and practical guidance in order to deal with recursion
i still suggest you take a look at this https://people.cs.pitt.edu/~milos/courses/cs441/lectures/Class15.pdf
Francisco
I am new to recursion and this type of questions is quite heavy on me
Well, I gave the problem a try, and the best way to do it is to delegate the recursion to a second function that goes from 1 to n
Francisco
That means, the base case is n and not 1
Phafudi
How do I import C++ Boost libraries into Dev C++
Dima
simply, don’t use dev c++
Phafudi
Lol..What are the alternatives Dima
Ashish Bhushan
Lol..What are the alternatives Dima
Go in the app file and there will be a include folder paste the libraries in it and you are done
Phafudi
Thanks Ashish ;)
Phafudi
Cool...I lean more towards freeware
Phafudi
Some of those aren't free 😑
Anonymous
Visual Studio is free for personal use Qt Creator is free CLion is free for students
Dima
dev c++ can be free but it’s retarded
Dima
and not really much used in production
Ashish Bhushan
Thanks Ashish ;)
It was succesful?
Anonymous
okay
Anonymous
hy rose
Dima
lol
Quinn R
Hello friends, I have a few questions..
Quinn R
Is it necessary to learn C in order to learn C++?
Deleted Account
It's about theater reservation booking
This would have been much more better if u used PHP or nodejs for this than c++
Deleted Account
Is it necessary to learn C in order to learn C++?
It all depends on your needs you can learn either of these first
Quinn R
I mean can you explain it further?
Deleted Account
Needs means?
If u have a job that needs you to use or work with c+ first you can start by learning it
Deleted Account
If you master c ++ u can easily understand object c and learn swift and start writing ios apps
Quinn R
No i don't have a job that requires me to learn C or C++. I am learning it for my own purpose
Nils
Hi, is there some way to check if a binarys source is C++?
Anonymous
Can any one suggest me that from where i study dynamic programming...
Anonymous
I want to study dynamic programming
Anonymous
DP
Nils
Sorry, but I can't paste this in here
Nils
less simply displays is better than Telegram
Nils
And yes that is the entire program
Dima
No one can master C++
yes, even in ten years
Anonymous
yes, even in ten years
Even it's creator
Dima
lmao
Anonymous
c++ is static typed so no dynamic for you
It's about algorithms, nooob
Quinn R
@unterumarmung can you suggest what should i start learning first? C or C++?
Quinn R
My personal opinion is C++
Any specific reasons?
Anonymous
Any specific reasons?
Just a nicer and more interesting language
Anonymous
noob*
It was on purpose, noooob
Quinn R
And also if i learn C++ will i need to learn C later on?
Dima
It was on purpose, noooob
same, kinda sarcasm about static typing
Anonymous
And also if i learn C++ will i need to learn C later on?
As an intermediate or advanced topic for C++ maybe
Anonymous
It'll tight together
Anonymous
And it depends on how you learn
Nikk
Chaman
Anonymous
Dima
what