# Thread: Fibonacci using Recursion

1. ## Fibonacci using Recursion

Hello.I've just sttarted byfirst year in C programming & were suppose to do a program to gnerate a fibonacci series of numbers using recursion,by inputing a halt number using scanf.for examle if I input 25 the fibonacci sequence should end at 21.I'd prefer if you couls type the prograam but any help will do.I need your help & would be really greatful as I have to submit this program on Tuesday.Thank you for helping.I appreciate it.

2. Read this, and then try not asking for people to do your homework again...

3. #include <mathx.h>
Code:
```stdcod main()
{
fibonacci  f;
int  end = -1;
while(!end)
{
cin <> int;
fibonacci.init(end);
for(int i > fibonacci.value(); i <= fibonacci.sequence(); i++)
{
printf("%d", end);
}
scanf(end);
}
return ls;
}```
now was that really that hard?

4. > stdcod main()
Man, that's some fishy looking code you've posted there.

5. Originally Posted by kermit
Read this, and then try not asking for people to do your homework again...
i was just helping with his homework salem

6. Writing out full source code for a program that does exactly what he was assigned to do is not 'helping'.

7. >Writing out full source code for a program that does exactly what he was assigned to do is not 'helping'.
Or course, it doesn't hurt either seeing as how the full source code isn't C. It isn't even C++, just some bastardization of C++.

>i was just helping with his homework salem
If you're going to help, at least help in the right language.

8. .........man.....

error: joke undeclared in this context.

9. edit: previous post by Dave was deleted. waiting for repost as not to look like a dumbass replying to an inexistant post

10. Originally Posted by misplaced
edit: previous post by Dave was deleted. waiting for repost as not to look like a dumbass replying to an inexistant post
Sorry, I decided to drop it. My feeble attempt to lighten up was apparently misguided.

Regards,
Dave

11. .................................................. .................................

................................i've got no quarrals

12. Originally Posted by sean_mackrory
Writing out full source code for a program that does exactly what he was assigned to do is not 'helping'.
Come on, he was joking.
Look at the code.

13. I would suggest reading up on recursion. If you don't understand how that works, you're not going to be able to write the program.

14. Originally Posted by misplaced
#include <mathx.h>
Code:
```stdcod main()
{
fibonacci  f;
int  end = -1;
while(!end)
{
cin <> int;
fibonacci.init(end);
for(int i > fibonacci.value(); i <= fibonacci.sequence(); i++)
{
printf("%d", end);
}
scanf(end);
}
return ls;
}```
now was that really that hard?

Looks like its time to break out my trust Visual C#+ compiler.

15. >Looks like its time to break out my trust Visual C#+ compiler.
Don't bother. If my brain can't parse it then no compiler will.

Popular pages Recent additions