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


Please Help Members By Posting Answers For Below Questions

Why isnt there a numbered, multi-level break statement to break out

590


Why do we need functions in c?

562


Why isnt any of this standardized in c?

640


Why do we use stdio h and conio h?

639


What is merge sort in c?

648






Write a C program on Centralized OLTP, Decentralized OLTP using locking mechanism, Semaphore using locking mechanism, Shared memory, message queues, channel of communication, sockets and a simple program on Saving bank application program using OLTP in IPC?

2174


How do shell structures work?

570


program to find out date after adding 31 days to a date in the month of febraury also consider the leap year

2579


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.

4507


Why do we use null pointer?

608


How can you convert integers to binary or hexadecimal?

617


Difference between strcpy() and memcpy() function?

681


What is a rvalue?

752


What is pointer in c?

743


Write program to remove duplicate in an array?

603