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 / nirupam mondal

#include <stdio.h>
void main ( )
{
long a,b,temp,i,n,j;
printf ("Enter the limit upto which you wantto print the fibonacci series : ");
scanf ("%ld",&n);
a=0;
b=1;
for (i=1; i<n; i++)
{
printf ("
%ld ",temp);
temp=a+b;
a=b;
b=temp;
for(j=2;j<temp;j++)
{
if(temp%j==0)
break;
}
if(temp==j)
printf(" The corresponding prime numbers of the series are : %ld ",temp);
}
}

Is This Answer Correct ?    0 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between exit() and _exit() function?

1105


Why do we use namespace feature?

1121


What is use of bit field?

1355


Is javascript written in c?

1119


What are the functions to open and close file in c language?

1265


What is storage class?

1126


Is swift based on c?

1154


How can I rethow can I return a sequence of random numbers which dont repeat at all?

1241


Explain what is meant by 'bit masking'?

1271


Is c object oriented?

1020


What is huge pointer in c?

1144


where are auto variables stored? What are the characteristics of an auto variable?

1109


Why is c platform dependent?

1143


what is the significance of static storage class specifier?

2346


What are the primitive data types in c?

1135