right-o. just in case you guys thought i'd become less of a dork or something over the past year, here's evidence to the contrary.

so i'm listening to this sasha track, the 1st track on the 2nd cd of his global underground ibiza set... and there's a voice in the track that says, "one.... one... two... three... five... eight... thirteen... twentyone." which i instantly recognize as the fibonacci sequence. hmm, thinks me, what are the next few fibonacci numbers? so i think, ok, 34, 55, 89, oh, screw it, this would be infinitely easier with a computer program.

so i pull up my trusty old Turbo C++ compiler and bang this out (mind you, i certainly haven't programmed in over a year):

#include "iostream.h" /**ed. note, these were in brackets but i changed it so it wouldn't think i was trying to convince it that there is an iostream.h html tag**/

//kat is a loser and is
//creating a fibonacci sequencer
//for the sheer goddamn hell of it.

int main()
int loopvar;
char Repeat = 'y';
while(Repeat == 'y')
cout << "How many fibonacci numbers would you like to compute? ";
cin >> loopvar;
long a[100];
a[0] = 1;
a[1] = 1;
cout << a[0] << endl << a[1] << endl;
for(int LCV=2; LCV < loopvar; LCV++)
a[LCV] = a[LCV-2] + a[LCV-1];
cout << a[LCV] << endl;
cout << endl << "Do again? (y/n) ";
cin >> Repeat;
return 0;

AND IT COMPILES! and it runs! and it likes me! and it tells me fibonacci numbers! i rule!!

*sigh* or maybe i'm just a dork.

No comments: