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

Tell me when is a void pointer used?

1239


How old is c programming language?

1063


Explain heap and queue.

1142


How many levels of indirection in pointers can you have in a single declaration?

1143


How do you use a 'Local Block'?

1226


How can you determine the size of an allocated portion of memory?

1361


Can we add pointers together?

1115


What is difference between %d and %i in c?

1302


What is the difference between int main and void main?

1095


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

1129


What are 'near' and 'far' pointers?

1091


What is difference between array and structure in c?

1267


Why does notstrcat(string, "!");Work?

1206


how is the examination pattern?

2062


Input is "rama loves rajesh and rajesh Loves rama also and rajesh wear gloves and bloves" To print output is count the numbers of times repeted the word love without case sensitive.

2120