Thursday, July 30, 2009

WRITE A C -PROGRAM FOR FIBONACCI SERIES FOR n NUMBERS USING DO-WHILE STATEMENT.?

use c program

WRITE A C -PROGRAM FOR FIBONACCI SERIES FOR n NUMBERS USING DO-WHILE STATEMENT.?
well i suppose fibonacci no r


0 1 1 2 3 5 8 13





then ur code will be





int i =2;


int no[100];// say


no[0] = 0;


no[1] = 1;


do{


no[i] = no[i-2] + no[i-1];


i++;


printf( "%d th fib is::%d",i,no[i] );


}


while( i %26lt; 100);
Reply:Lol. I had to do this program in C and Java. Do your own homework man.


No comments:

Post a Comment