Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

compute the nth mumber in the fibonacci sequence?

Answer Posted / theredplanethavoc

#include<stdio.h>
#include<conio.h>
void main()
{
int a=0,b=1,c,n,i;
clrscr();
printf("Enter n:");
scanf("%d",&n);
printf("The fibonacci sequence is as follows : \n");
for(i=1;i<=n;i++)
{
c=a+b;
printf("%d ",c);
a=b;
b=c;
}
printf("The nth number in the fibonacci sequence is : %d",c);
getch();
}

Is This Answer Correct ?    25 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Where are local variables stored in c?

992


What is a MAC Address?

1017


What is the advantage of an array over individual variables?

1192


What is spaghetti programming?

1084


Differentiate between the expression “++a” and “a++”?

1211


What is the difference between procedural and functional programming?

1022


what do the 'c' and 'v' in argc and argv stand for?

1122


what is ur strangth & weekness

2343


void main(){ int a; a=1; while(a-->=1) while(a-->=0); printf("%d",a); }

1681


What is the difference between declaring a variable by constant keyword and #define ing that variable?

3297


Explain what is the difference between the expression '++a' and 'a++'?

1167


What is register variable in c language?

995


Are the expressions * ptr ++ and ++ * ptr same?

1094


What is structure in c explain with example?

1107


Is c compiled or interpreted?

1141