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
When should the volatile modifier be used?
When should we use pointers in a c program?
Did c have any year 2000 problems?
What is the use of getchar functions?
What are the different categories of functions in c?
Why is #define used?
How can I call system when parameters (filenames, etc.) Of the executed command arent known until run time?
Can you explain what keyboard debouncing is, and where and why we us it? please give some examples
What is 2 d array in c?
What would happen to X in this expression: X += 15; (assuming the value of X is 5)
What are global variables and explain how do you declare them?
Can you pass an entire structure to functions?
Why is c called a structured programming language?
What is the incorrect operator form following list(== , <> , >= , <=) and what is the reason for the answer?
How can I sort more data than will fit in memory?