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

Answer Posted / ruchi

#include<stdio.h>
#include<conio.h>
int main()
{
int n,a=1,b,c=0,d=0,i,j;
printf("\nenter the number ");
scanf("%d",&n);
printf("\nThe fibbonacci prime numbers are ");
for(i=0;i<=n-1;i++)
{
b=c+a;
a=c;
c=b;
j=2;
while(j<=b-1)
{

if(b%j==0)
{

break;
}
j++;
}
if(j==b)
{
printf("\n%d",b);
}

}
getch();
}

Is This Answer Correct ?    16 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between abs() and fabs() functions?

1057


Why c is a procedural language?

1003


Why is c used in embedded systems?

1056


What will the code below print when it is executed?   int x = 3, y = 4;         if (x = 4)                 y = 5;         else                 y = 2;         printf ("x=%d, y=%d ",x,y);

1810


How can I insert or delete a line (or record) in the middle of a file?

972


What are header files why are they important?

1036


Explain the properties of union. What is the size of a union variable

1125


What is a ternary operator in c?

1053


Find MAXIMUM of three distinct integers using a single C statement

1005


What are different types of pointers?

1009


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

1234


How can you allocate arrays or structures bigger than 64K?

1078


How can you access memory located at a certain address?

1057


which is conditional construct a) if statement b) switch statement c) while/for d) goto

1163


How can I recover the file name given an open stream?

944