002

Fibonacci's 8th Term - August 25, 2009
Rating: 4.8/5 (21 votes cast)
  • Currently 4.8/5
  • 1
  • 2
  • 3
  • 4
  • 5
Spiked Math Comic - Fibonacci Served His Time


original

Subscribe to feed             


home     info     archive     contact     rss

Facebook Page   //   Twitter Page


3 Comments

I once wrote out the Fibonacci sequence to the 98th number.
I was bored...

He need a pair of rabbits to pass the time.

//yeh on that same topic.../
import java.io.*;
class Fibonacci {
public static void main(String[] args) throws IOException {
PrintWriter wF = new PrintWriter(new BufferedWriter(new FileWriter("Fibonacci.txt")));
long[] Fibonacci = new long [94];
int c=0;
wF.println("The Fibonacci Sequence on its first 100 places:");
Fibonacci[0]=0;Fibonacci[1]=1;
System.out.println("Fibonacci[0] = 0");
wF.println("Fibonacci[0] = 0");
System.out.println("Fibonacci[1] = 1");
wF.println("Fibonacci[1] = 1");
for(c=2;c Fibonacci[c]=Fibonacci[c-1]+Fibonacci[c-2];
System.out.println("Fibonacci["+c+"] = "+Fibonacci[c]+" which is: "+Fibonacci[c-1]+" + "+Fibonacci[c-2]);
wF.println("Fibonacci["+c+"] = "+Fibonacci[c]+" which is: "+Fibonacci[c-1]+" + "+Fibonacci[c-2]);
}
wF.close();
}
}//am i a nerd?/

Leave a comment

Profile pictures are tied to your email address and can be set up at Gravatar. Click here for recent comments.
(Note: You must have javascript enabled to leave comments, otherwise you will get a comment submission error.)



                                     



home     info     archive     contact     rss

Facebook Page   //   Twitter Page






Welcome to Spiked Math!

Hello my fellow math geeks. My name is Mike and I am the creator of Spiked Math Comics, a math comic dedicated to humor, educate and entertain the geek in you. Beware though, there might be some math involved :D



Comics that involve math:

Math Shirts
by Spiked Math