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 in c language to print your bio-data on the screen by using functions.

6793


Differentiate between new and malloc(), delete and free() ?

1192


Study the following C program :call_me (myvar)int myvar;{ myvar +- 5; }main(){int myvar;myvar = 3;call_me(myvar);printf("%d ",myvar);What will be printed a) 3 b) 5 c) 8 d) symbol

1124


how to construct a simulator keeping the logical boolean gates in c

2264


Write a programme using structure that create a record of students. The user allow to add a record and delete a record and also show the records in ascending order.

2100


Which one would you prefer - a macro or a function?

1097


Is main an identifier in c?

1148


What is the difference between struct and typedef struct in c?

1133


Explain what will be the outcome of the following conditional statement if the value of variable s is 10?

1260


Is fortran faster than c?

1048


Without Computer networks, Computers will be half the use. Comment.

2315


What is the difference between a string and an array?

1218


What is a good way to implement complex numbers in c?

1055


What are the 5 types of inheritance in c ++?

1030


What does calloc stand for?

1174