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 / dinesh kumar .n

#include<stdio.h>
#include<conio.h>
void main()
{
int a=-1,b=1,c,n,i;
printf("enter the number");
scanf("%d",&n);
for(i=1;i<=n;i++)
{
c=a+b;
printf("%d",c);
a=b;
b=c;
}
getch();
}

Is This Answer Correct ?    6 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between text files and binary files?

1354


Can you please explain the difference between syntax vs logical error?

1199


Do you know pointer in c?

1059


Tell us bitwise shift operators?

1102


What is double pointer in c?

1045


Can a local variable be volatile in c?

1001


What is uint8 in c?

1108


What is a macro in c preprocessor?

1107


Compare interpreters and compilers.

1074


What oops means?

1008


How can you draw circles in C?

1157


What is c variable?

1050


What is #pragma statements?

1105


Is main is user defined function?

1159


What is the use of getchar functions?

1185