write a program to generate 1st n fibonacci prime number
Answer Posted / abdifatah mohiadin adam
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 ? | 9 Yes | 8 No |
Post New Answer View All Answers
Do you know what are the properties of union in c?
a function gets called when the function name is followed by a a) semicolon (;) b) period(.) c) ! d) none of the above
What is the purpose of the statement: strcat (S2, S1)?
Want to know how to write a C program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the total number of disk writes by MySQL.
What is difference between scanf and gets?
How can you draw circles in C?
Is there any data type in c with variable size?
show how link list can be used to repersent the following polynomial i) 5x+2
How are portions of a program disabled in demo versions?
Explain #pragma statements.
What is the correct declaration of main?
Why is c platform dependent?
What is adt in c programming?
Are there constructors 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.