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 / d. prashant

#include<stdio.h>
#include<conio.h>
void main()
{
int a =0,b=1,c,i=2,n;
clrscr();
printf("Enter N Value : ");
scanf("%d",&n);
printf("%d\t%d\t",a,b);
while(n>i)
{
c = a+b;
printf("%d\t",c);
c=b;
b=a;
i++;
}
getch();
}

Is This Answer Correct ?    3 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Write a program with dynamically allocation of variable.

1183


Write a C Program That Will Count The Number Of Even And Odd Integers In A Set using while loop

2209


What does %c mean in c?

1141


Why double pointer is used in c?

1090


How to write a code for implementing my own printf() and scanf().... Please hep me in this... I need a guidance... Can you give an coding for c... Please also explain about the header files used other than #include...

5535


What is methods in c?

1142


What is meant by type casting?

1106


what is the role you expect in software industry?

2200


Why doesn't C support function overloading?

2868


Explain what is the benefit of using #define to declare a constant?

1276


What is nested structure with example?

1135


Write a program to know whether the input number is an armstrong number.

1172


disply the following menu 1.Disply 2.Copy 3.Append; as per the menu do the file operations 4.Exit

2108


any C program contains only one function, it must be a) void () b) main () c) message () d) abc ()

1171


What is the newline escape sequence?

1144