write a program to generate 1st n fibonacci prime number
Answer Posted / yagneswara babu
void main()
{
int x1,x2,x3,n,i;
x1=0;
x2=1;
printf("enter a value for n : ");
scanf("%d",&n);
printf("%d %d ",x1,x2);
for(i=3;i<=n;i++)
{
x3=x1+x2;
printf("%d ",x3);
x1=x2;
x2=x3;
}
}
| Is This Answer Correct ? | 35 Yes | 40 No |
Post New Answer View All Answers
What are the different types of linkage exist in c?
What is a program flowchart and explain how does it help in writing a program?
What are the disadvantages of external storage class?
What are the general description for loop statement and available loop types in c?
What are the 4 types of programming language?
How to create struct variables?
What is define c?
Why do we need arrays in c?
Explain the ternary tree?
Explain the properties of union.
How can my program discover the complete pathname to the executable from which it was invoked?
List some of the static data structures in C?
What is equivalent to ++i+++j?
How can I get back to the interactive keyboard if stdin is redirected?
What is the difference between c and python?