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...


write a program to generate 1st n fibonacci prime number

Answers were Sorted based on User's Feedback



write a program to generate 1st n fibonacci prime number..

Answer / arun

void main()
{
int x1,x2,x3,n,i;
x1=0;
x2=1;
printf("enter a value for n : ");
scanf("%d",&n);
printf("%d %d ",x1,x2);
for(i=3;i<=n;i++)
{
x3=x1+x2;
printf("%d ",x3);
x1=x2;
x2=x3;
}
}

Is This Answer Correct ?    4 Yes 10 No

write a program to generate 1st n fibonacci prime number..

Answer / gayathri

void main()
{
int x1,x2,x3,i;
x1=-1;
x2=1;
printf("enter the value for n :");
scanf("%d",&n);
print
for(i=0;i<n;i++)
{
x3=x1+x2;

if((x3 mod 2)!=0)
{
printf("%d ",x3)
}
x1=x2;
x2=x3;
}

}

Is This Answer Correct ?    7 Yes 15 No

Post New Answer

More C Interview Questions

What are disadvantages of C language.

0 Answers   iNautix,


how to swap two integers 1 and 32767 without using third variable

11 Answers   Microsoft, TCS,


What is getch () for?

0 Answers  


Devise a program that inputs a 3 digit number n and finds out whether the number is prime or not. Find out its factors.

0 Answers   TCS,


Write a program to identify if a given binary tree is balanced or not.

0 Answers   JPMorgan Chase,


why array index always starts from zero??

4 Answers   TCS,


When is a void pointer used?

0 Answers  


what is differnence b/w macro & functions

1 Answers  


Where are some collections of useful code fragments and examples?

0 Answers   Celstream,


what is the difference between. system call and library function?

2 Answers   CDAC, Satyam,


application attempts to perform an operation?

0 Answers  


c program to subtract between two numbers without using '-' sign and subtract function.

1 Answers  


Categories