write a program to generate 1st n fibonacci prime number

Answer Posted / namrata

void main()
{
int x=1,i=0,n;
printf("Enter the value for n ");
scanf("%d",&n);
printf("\n%d ,",i);
for(;n>=1;--n)
{
x=x+i;
i=x-i;
printf("%d ,",x);
}
getch();
}

Is This Answer Correct ?    2 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Using functions, write a program that multiplies two arrays. Use the following functions: - Function ReadArray - Function MultiplyArrays - Function DisplayArrays

1897


What would be an example of a structure analogous to structure c?

579


How can I implement sets or arrays of bits?

611


What is an lvalue in c?

701


Explain the concept and use of type void.

635






How can I use a preprocessorif expression to ?

605


What is meant by errors and debugging?

655


Explain about C function prototype?

613


Explain how can I convert a number to a string?

652


Explain how can I right-justify a string?

631


What is function and its example?

632


When should volatile modifier be used?

559


Add Two Numbers Without Using the Addition Operator

357


Is array name a pointer?

608


What should malloc() do? Return a null pointer or a pointer to 0 bytes?

628