generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Club Houses » Off Topic
Home Search
 

Re: Challenge #5 for programming nerds

Previous Thread :: Next Thread 
iMightBeLying is not online. iMightBeLying
Forum Moderator
Joined: 04 Sep 2014
Total Posts: 144
05 Mar 2015 05:59 PM
Hey OT, time to learn some stuff and test your brain power.

A recursive function is a code function that calls itself to find an answer. For example : 6 factorial is equal to 6 * 5 * 4 * 3 * 2 * 1.
This can recursively be written as factorial(6) = 6 * factorial(5) where,
function factorial(int i)
{
if (i <= 1)
return 1;
else
return factorial( i - 1 );
}

For today's challenge, write a recursive function to find the number at a provided sequence in the Fibonacci sequence. The sequence is as follows: 1 1 2 3 5 8 13 21 34 55 89 etc.

So, if I asked for fibonacci(6), your function should return the value 8.
Report Abuse
GyroPulse is not online. GyroPulse
Joined: 05 Jun 2011
Total Posts: 4886
05 Mar 2015 06:00 PM
HOW DO I SOLVE THIS


AHGHHH
Report Abuse
Vineshroom is not online. Vineshroom
Joined: 25 Apr 2009
Total Posts: 76152
05 Mar 2015 06:01 PM
i'm too lazy
Report Abuse
iMightBeLying is not online. iMightBeLying
Forum Moderator
Joined: 04 Sep 2014
Total Posts: 144
05 Mar 2015 06:02 PM
If you need help, you can Google "recursion"

and, amusingly enough, it will ask you if you meant "recursion"
Report Abuse
OutspokenKieran is not online. OutspokenKieran
Joined: 12 Sep 2011
Total Posts: 11868
05 Mar 2015 06:02 PM
My brain is mush.
Report Abuse
monkeycheetoz is not online. monkeycheetoz
Joined: 15 Feb 2013
Total Posts: 2325
05 Mar 2015 06:03 PM
but your username is "iMightBeLying"
how do we trust you?
Report Abuse
iMightBeLying is not online. iMightBeLying
Forum Moderator
Joined: 04 Sep 2014
Total Posts: 144
05 Mar 2015 06:05 PM
You don't have to trust me to write code.
Report Abuse
monkeycheetoz is not online. monkeycheetoz
Joined: 15 Feb 2013
Total Posts: 2325
05 Mar 2015 06:06 PM
but what if this is all a troll, good sir?
Report Abuse
iMightBeLying is not online. iMightBeLying
Forum Moderator
Joined: 04 Sep 2014
Total Posts: 144
05 Mar 2015 06:08 PM
I trust in your internet detective abilities to sniff out the truth from the lies.
Report Abuse
monkeycheetoz is not online. monkeycheetoz
Joined: 15 Feb 2013
Total Posts: 2325
05 Mar 2015 06:09 PM
well what if i joined the internet a couple days ago?
Report Abuse
GyroPulse is not online. GyroPulse
Joined: 05 Jun 2011
Total Posts: 4886
05 Mar 2015 06:09 PM
oooh this kid is getting roasted
Report Abuse
OutspokenKieran is not online. OutspokenKieran
Joined: 12 Sep 2011
Total Posts: 11868
05 Mar 2015 06:10 PM
how to math again?
Report Abuse
iMightBeLying is not online. iMightBeLying
Forum Moderator
Joined: 04 Sep 2014
Total Posts: 144
05 Mar 2015 06:10 PM
Quit trying to get off topic. Have you guys and gals even noticed the pattern yet?
Report Abuse
GammaGeek is not online. GammaGeek
Joined: 10 Aug 2014
Total Posts: 11182
05 Mar 2015 06:11 PM
Do I get your lunch money if I do this

"The problem with internet quotes is that you cannot always depend on their accuracy." - Abraham Lincoln, 2013.
Report Abuse
monkeycheetoz is not online. monkeycheetoz
Joined: 15 Feb 2013
Total Posts: 2325
05 Mar 2015 06:11 PM
well, i am just gonna back out of this before i get banned
also, you literally just told me to quit getting off topic IN OFF TOPIC
Report Abuse
GyroPulse is not online. GyroPulse
Joined: 05 Jun 2011
Total Posts: 4886
05 Mar 2015 06:11 PM
ah i see.. the numbers must be my hourly income... nice job figuring that out.
Report Abuse
OutspokenKieran is not online. OutspokenKieran
Joined: 12 Sep 2011
Total Posts: 11868
05 Mar 2015 06:12 PM
"Quit trying to get off topic."

Are you sure you meant to post this here?
Report Abuse
iMightBeLying is not online. iMightBeLying
Forum Moderator
Joined: 04 Sep 2014
Total Posts: 144
05 Mar 2015 06:12 PM
Marvelous point. How does cat? What am food? When is spaghetti?

Anyways, I'm not going to ban you, but let's get back to math.
Report Abuse
NarutosRasengan1 is not online. NarutosRasengan1
Joined: 28 Jun 2007
Total Posts: 15727
05 Mar 2015 06:12 PM
don't worry moderator bro im working hard on this code


"The Sauza so malo...", and then she said "You need to grow up."
Report Abuse
monkeycheetoz is not online. monkeycheetoz
Joined: 15 Feb 2013
Total Posts: 2325
05 Mar 2015 06:12 PM
@outspoken
EXACTLY
Report Abuse
monkeycheetoz is not online. monkeycheetoz
Joined: 15 Feb 2013
Total Posts: 2325
05 Mar 2015 06:13 PM
yes thank you moderator!
you are pretty cool y'know
Report Abuse
ClassicShrek is not online. ClassicShrek
Joined: 08 Jul 2011
Total Posts: 7983
05 Mar 2015 06:13 PM
is this a joke
why would u post this in ot, u know we cant haddle this!!!
Report Abuse
violetrock1 is not online. violetrock1
Joined: 28 Aug 2012
Total Posts: 15118
05 Mar 2015 06:14 PM
[ Content Deleted ]
Report Abuse
NarutosRasengan1 is not online. NarutosRasengan1
Joined: 28 Jun 2007
Total Posts: 15727
05 Mar 2015 06:14 PM
Alright, I think this is right or at least close:

function fibonacci(int i)
{
if(i <= 1)
return 1;
else
return fibonacci(n - 1) + fibonacci(n - 2)


"The Sauza so malo...", and then she said "You need to grow up."
Report Abuse
iMightBeLying is not online. iMightBeLying
Forum Moderator
Joined: 04 Sep 2014
Total Posts: 144
05 Mar 2015 06:14 PM
@classicShrek
I believe you guys are smarter than you think you are.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Club Houses » Off Topic
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image