write a program to generate 1st n fibonacci prime number

Answers were Sorted based on User's Feedback



write a program to generate 1st n fibonacci prime number..

Answer / amit thakur

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 ?    6 Yes 4 No

write a program to generate 1st n fibonacci prime number..

Answer / 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

More C Interview Questions

When should you use a type cast?

0 Answers  


control 50 devices which has 2 states on and off.using bitwise operator.plz answer it its urgent

1 Answers  


How do I use void main?

0 Answers  


Write a program for deleting duplicate elements in an array

3 Answers   Subex,


WRITE A PROGRAM IN C TO MULTIPLY TWO 2-D ARRAYS

4 Answers  






can any one please explain, how can i access hard disk(physical address)? it is possible by the use of far,near or huge pointer? if yes then please explain......

0 Answers  


Why does everyone say not to use gets?

0 Answers  


write a program to gat the digt sum of a number (et. 15= >1+5=6)

2 Answers  


program for reversing a selected line word by word when multiple lines are given without using strrev

0 Answers   IBM,


An instruction which is analysed and acted upon by the processor prior to the compiler going its work a) directive b) constructive c) constant d) absolute mode

0 Answers  


List some of the dynamic data structures in C?

0 Answers  


How can you find out how much memory is available?

0 Answers  


Categories