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 is difference between && and & in c?
if the area was hit by a virus and so the decrease in the population because of death was x/3 and the migration from other places increased a population by 2x then annually it had so many ppl. find our the population in the starting.
Is fortran still used in 2018?
How do you print only part of a string?
What are structure types in C?
What is fflush() function?
Explain what are compound statements?
What is the difference between printf and scanf in c?
Explain the properties of union. What is the size of a union variable
Explain modulus operator. What are the restrictions of a modulus operator?
In c programming write a program that will print 10 multiples of 3 except 15,18,21 using looping
how can i access hard disk address(physical address)? are we access hard disk by using far,near or huge pointer? if yes then please explain.....
main() { int i = 10; printf(" %d %d %d ", ++i, i++, ++i); }
What is the difference between exit() and _exit() function?
When should we use pointers in a c program?