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 value of uninitialized variable in c?

974


How can I get back to the interactive keyboard if stdin is redirected?

1130


Declare the structure which contains the following members and write in C list of all students who score more than 75 marks. Roll No, Name, Father Name, Age, City, Marks.

1255


Are there any problems with performing mathematical operations on different variable types?

988


c language interview questions & answer

1894


Is struct oop?

955


Not all reserved words are written in lowercase. TRUE or FALSE?

1172


What are compound statements?

1080


How can I write functions that take a variable number of arguments?

1075


What is wrong with this program statement?

983


Write a Program to accept different goods with the number, price and date of purchase and display them

6139


There is a practice in coding to keep some code blocks in comment symbols than delete it when debugging. How this affect when debugging?

1238


How is = symbol different from == symbol in c programming?

981


What is the need of structure in c?

1044


i have to apply for the rbi for the post of officers. i need to know abt the entrance questions whether it may be aps or techinical....

1916