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
What is huge pointer in c?
Is there sort function in c?
What’s a signal? Explain what do I use signals for?
An organised method of depicting the use of an area of computer memory used to signify the uses for different parts of the memory a) swap b) extended memory c) memory map d) all of the above
What is a class c rental property?
Can you please explain the difference between exit() and _exit() function?
How to throw some light on the b tree?
how to build a exercise findig min number of e heap with list imlemented?
What is the description for syntax errors?
Explain how do you sort filenames in a directory?
Write a C++ program to generate 10 integer numbers between - 1000 and 1000, then store the summation of the odd positive numbers in variable call it sum_pos, then find the maximum digit in this variable regardless of its digits length.
What is struct node in c?
What is static memory allocation? Explain
What is a good data structure to use for storing lines of text?
hi to every one .. how to view table pool after creating the pooled table? plz help me.. if any knows abt this ..