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


Please Help Members By Posting Answers For Below Questions

Are comments included during the compilation stage and placed in the EXE file as well?

673


What is pass by reference in c?

615


Where can I get an ansi-compatible lint?

643


What is queue in c?

579


In a header file whether functions are declared or defined?

630






What are the advantages of c language?

667


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

649


What is static memory allocation?

610


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.

2223


What is the difference between c and python?

587


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);

646


What is an example of structure?

589


Why is event driven programming or procedural programming, better within specific scenario?

1955


Can you please explain the scope of static variables?

605


How can I read and write comma-delimited text?

622