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
What are the different types of data structures in c?
What is malloc return c?
Is c weakly typed?
Describe wild pointers in c?
What are bitwise shift operators in c programming?
in multiple branching construct "default" case is a) optional b) compulsarily c) it is not include in this construct d) none of the above
Give me the code of in-order recursive and non-recursive.
write a c program thal will find all sequences of length N that produce the sum is Zero, print all possible solutions?
What is a 'null pointer assignment' error? Explain what are bus errors, memory faults, and core dumps?
Write a C program linear.c that creates a sequence of
processes with a given length. By
sequence it is meant that each created process has exactly
one child.
Let's look at some example outputs for the program.
Here the entire process sequence consists of process 18181:
Sara@dell:~/OSSS$ ./linear 1
Creating process sequence of length 1.
18181 begins the sequence.
An example for a sequence of length three:
Sara@dell:~/OSSS$ ./linear 3
Creating process sequence of length 3.
18233 begins the sequence.
18234 is child of 18233
18235 is child of 18234
........ this is coad .... BUt i could not compleate it .....:(
#include
Explain how do you override a defined macro?
Describe the modifier in c?
How does #define work?
Why header files are used?
What are the loops in c?