write a program to generate 1st n fibonacci prime number
Answer Posted / gayathri
void main()
{
int x1,x2,x3,i;
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 ? | 7 Yes | 15 No |
Post New Answer View All Answers
What does nil mean in c?
Write a C program in Fibonacci series.
Why we use break in c?
Hai,I have done with my bachelor of commerce and planing to ms,please suggest me how to convince vo for shifting from commerce to computers. Visa on 8 DEC 2014 Npu university
How can I handle floating-point exceptions gracefully?
Explain what does it mean when a pointer is used in an if statement?
how to print the character with maximum occurence and print that number of occurence too in a string given ?
How can I check whether a file exists? I want to warn the user if a requested input file is missing.
Can you explain what keyboard debouncing is, and where and why we us it? please give some examples
What are the advantages and disadvantages of c language?
How do you use a pointer to a function?
How many levels of pointers can you have?
What is switch in c?
Is main an identifier in c?
What is %g in c?