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
Can the curly brackets { } be used to enclose a single line of code?
What are the 32 keywords in c?
how many key words availabel in c a) 28 b) 31 c) 32
What are the uses of null pointers?
Explain what is output redirection?
What is #include called?
What is difference between structure and union?
what is ur strangth & weekness
1) write a program to generate 1st n fibonacci prime numbers using Nested if 2) write a program to generate twin prime numbers from m to n using nested if 3) write a program to check whether a given integer is a strong number or not using nested if 4) Write a program to generate prime factors of a given integer using nested if 5)write a program to generate prime numbers from m to n using nested if 6)write a program to generate perfect numbers from m to n using nested if 7)write a program to generate the pallindromes from m to n using neste if 8)write a program to generate armstrong numbers from m to n using nested if 9)write a program to generate strong numbers from m to n using nested if
Explain with the aid of an example why arrays of structures don’t provide an efficient representation when it comes to adding and deleting records internal to the array.
Why clrscr is used after variable declaration?
Hi can anyone tell what is a start up code?
How to write a multi-statement macro?
How can I remove the trailing spaces from a string?
What is typedef struct in c?