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
Explain how can a program be made to print the name of a source file where an error occurs?
List some of the static data structures in C?
shorting algorithmS
What is the time and space complexities of merge sort and when is it preferred over quick sort?
void main(){ int a; a=1; while(a-->=1) while(a-->=0); printf("%d",a); }
Explain what is the difference between null and nul?
Design a program which assigns values to the array temperature. The program should then display the array with appropriate column and row headings.
How can you access memory located at a certain address?
What is a program flowchart?
What is scope of variable in c?
What are the different file extensions involved when programming in C?
What are header files? What are their uses?
Hi can anyone tell what is a start up code?
Can static variables be declared in a header file?
Explain how does free() know explain how much memory to release?