write a program to generate 1st n fibonacci prime number
Answer Posted / arun
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 ? | 4 Yes | 10 No |
Post New Answer View All Answers
What does sizeof return c?
what is the basis for selection of arrays or pointers as data structure in a program
Can you please explain the difference between strcpy() and memcpy() function?
Give me the code of in-order recursive and non-recursive.
Is c dynamically typed?
What is the main difference between calloc () and malloc ()?
What is difference between static and global variable in c?
Who invented bcpl language?
What is scanf () in c?
How can you invoke another program from within a C program?
Explain what is a const pointer?
Which programming language is best for getting job 2020?
Why we use int main and void main?
I just typed in this program, and it is acting strangely. Can you see anything wrong with it?
Differentiate abs() function from fabs() function.