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

Why do we use return in c?

960


Hello. How to write a C program to check and display president party like if i type in the console "biden" and hit enter the output shoud be : "biden is democrat" and if i type "trump" and hit enter the output shoud be: "trump is republican"

2050


Which is best book for data structures in c?

1063


What are the uses of null pointers?

1059


What does do in c?

1010


How reliable are floating-point comparisons?

1059


What are header files in c?

1045


Why are some ANSI/ISO Standard library routines showing up as undefined, even though I've got an ANSI compiler?

1096


"%u" unsigned integer print the a) address of variable b) value of variable c) name of a variable d) none of the above

992


What is the difference between single charater constant and string constant?

1055


Write a program for finding factorial of a number.

1046


What is wrong in this statement? scanf(ā€œ%dā€,whatnumber);

1203


Explain two-dimensional array.

1026


What is the most efficient way to count the number of bits which are set in an integer?

1019


What is a global variable in c?

972