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

What are the application of void data type in c?

1133


Why C language is a procedural language?

976


What’s the special use of UNIONS?

1106


What is restrict keyword in c?

1049


What does char * * argv mean in c?

998


What is array in c with example?

1166


how is the examination pattern?

1965


How do you determine the length of a string value that was stored in a variable?

1081


Why & is used in scanf in c?

1049


int main() { Int n=20,i; For(i=0;i<=n;i--) { Printf(“-“); Return 0;

1729


What is difference between far and near pointers?

986


What is action and transformation in spark?

1082


What is else if ladder?

965


Write a program of advanced Fibonacci series.

1093


What is data type long in c?

1026