English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

2 answers

Since you're asking for assembly code, it would be a great help to know what machine you're using. Native mode varies quite a bit from machine to machine.

Also, the fibonacci series grows kinda quickly, so doing it in assembly will be a real pain in short order.

You might want to consider something like FORTH which will let you define an arbitrary precision (number of bytes used to represent a number)

Doug

2007-09-28 15:10:48 · answer #1 · answered by doug_donaghue 7 · 0 0

this is for c++

# include
void main()
{
const double limit = 1*10E10;
double next =0, last = 1, sum;
int i = 1;

while ( next < limit / 2 )
{
cout< if ( i % 5 == 0 )
cout<<"\n";
sum = next + last ;
next = last;
last = sum;
i++;
}
cout<<"\n";
}

2007-09-29 01:49:36 · answer #2 · answered by kohf1driver 2 · 0 0

fedest.com, questions and answers