write a program to generate 1st n fibonacci prime number
Answers were Sorted based on User's Feedback
Answer / arun
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 ? | 4 Yes | 10 No |
Answer / 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 |
How can we allocate array or structure bigger than 64kb?
Explain the difference between call by value and call by reference in c language?
Is both getch() and getchar() functions are similar? if it is similar means why these two functions are used for same usage? if it is not similar means what is the difference?
what is data structure
What is #define?
Explain what are compound statements?
write a c program thal will find all sequences of length N that produce the sum is Zero, print all possible solutions?
What is pre-emptive data structure and explain it with example?
How do you convert a decimal number to its hexa-decimal equivalent.Give a C code to do the same
Explain command-line arguments in C.
write a program to print %d ?
Is javascript based on c?