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
By using C language input a date into it and if it is right?
What is an operator?
Why is event driven programming or procedural programming, better within specific scenario?
Is c call by value?
What is use of bit field?
what is bit rate & baud rate? plz give wave forms
Hai,I have done with my bachelor of commerce and planing to ms,please suggest me how to convince vo for shifting from commerce to computers. Visa on 8 DEC 2014 Npu university
Which control loop is recommended if you have to execute set of statements for fixed number of times?
What is union in c?
What does c mean?
Where we use clrscr in c?
What does s c mean on snapchat?
Is there sort function in c?
What is the use of header?
how to make a scientific calculater ?