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 / manish soni tagore collage jai

#include<stdio.h>
#include<conio.h>
void main()
{
int a,b,sum,n,cnt;
printf("Enter the number");
scanf("%d",&n);
for(a=0,b=1,cnt=1;cnt<=n;cnt++)
{
sum=a+b;
printf("%d\t",sum);

a=b;
b=sum;
}
getch();

}

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why does everyone say not to use scanf? What should I use instead?

1469


Explain how do you search data in a data file using random access method?

1175


What tq means in chat?

1173


how to introdu5ce my self in serco

2049


What is a function in c?

1678


What is the value of h?

1085


Explain what is the difference between null and nul?

1214


Why static is used in c?

1144


What are the disadvantages of c language?

1255


What is sizeof return in c?

1088


Where register variables are stored in c?

1000


Does c have function or method?

1060


Describe the complexity of Binary search, Quicksort and various other sorting and searching techniques..

1070


How variables are declared in c?

1099


What is the best way of making my program efficient?

1083