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 / swapna

#include <stdio.h>
#include <conio.h>
void main ( )
{
long a,b,c,i,n,j;
clrscr( );
printf ("\n Enter the number to print fibnocci
prime number\t");
scanf ("%ld",&n);
a=0;
b=1;
for (i=1; i<n; i++)
{
c=a+b;
a=b;
b=c;
printf ("\n fibnoci series is %ld\t",c);
for(j=2;j<c;j++)
{
if(c%j==0)
break;
}
if(c==j)
printf(" prime number is %ld\t",c);
}
getch();
}

Is This Answer Correct ?    89 Yes 39 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why is c platform dependent?

1023


What is array in c with example?

1166


What are the 5 organizational structures?

970


What is pointer & why it is used?

1061


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

1133


What is mean by Data Driven framework in QTP? Can any one answer me in details on this regard.

2204


What is self-referential structure in c programming?

1142


What is the use of pragma in embedded c?

1003


write a program to rearrange the array such way that all even elements should come first and next come odd

2223


What is s or c?

1014


Why is void main used?

1034


What does 3 mean in texting?

1029


What is the best way to store flag values in a program?

1009


How do you write a program which produces its own source code as output?

1059


What is the difference between far and near in c?

997