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
Are comments included during the compilation stage and placed in the EXE file as well?
What is pass by reference in c?
Where can I get an ansi-compatible lint?
What is queue in c?
In a header file whether functions are declared or defined?
What are the advantages of c language?
A text file that contains declarations used by a group of functions,programs,or users a) executable file b) header file c) obj file d) .cfile
What is static memory allocation?
7-Given an index k, return the kth row of the Pascal's triangle. For example, when k = 3, the row is [1,3,3,1]. For reference look at the following standard pascal’s triangle.
What is the difference between c and python?
a=10;b= 5;c=3;d=3; if(a printf(%d %d %d %d a,b,c,d) else printf("%d %d %d %d a,b,c,d);
What is an example of structure?
Why is event driven programming or procedural programming, better within specific scenario?
Can you please explain the scope of static variables?
How can I read and write comma-delimited text?