write a program to generate 1st n fibonacci prime number
Answer Posted / rose
void main()
{
int x1,x2,x3,i,n;
x1=-1;
x2=1;
printf("enter the value for n :");
scanf("%d",&n);
print
for(i=0;i<n;i++)
{
x3=x1+x2;
if((x3 mod 2)!=0)
{
printf("%d ",x3)
}
x1=x2;
x2=x3;
}
}
| Is This Answer Correct ? | 6 Yes | 12 No |
Post New Answer View All Answers
Why do we use header files in c?
Are the variables argc and argv are always local to main?
"%u" unsigned integer print the a) address of variable b) value of variable c) name of a variable d) none of the above
Explain why can’t constant values be used to define an array’s initial size?
Explain how can you tell whether a program was compiled using c versus c++?
How do I get a null pointer in my programs?
What does p mean in physics?
What is the difference between int main and void main in c?
What does a function declared as pascal do differently?
In the DOS enveronment, normal RAM that resides beyond the 1mb mark. a) expanded memory b) swapped memory c) Extended memory d) none
What is the difference between abs() and fabs() functions?
Differentiate between the = symbol and == symbol?
What does c mean in standard form?
Why can't I perform arithmetic on a void* pointer?
write a program to find out prime number using sieve case?