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 |
What is ## preprocessor operator in c?
What is meant by high-order and low-order bytes?
Given an array of characters which form a sentence of words, give an efficient algorithm to reverse the order of the words (not characters) in it?
Calculate 1*2*3*____*n using recursive function??
what is the output of the following program? #include<stdio.h> void main() { float x=1.1; while(x==1.1) { printf("\n%f",x); x=x-0.1; } }
write a c program to find the roots of a quadratic equation ax2 + bx + c = 0
11 Answers CSC, St Marys, TATA,
what do u mean by Direct access files? then can u explain about Direct Access Files?
Hi Every one......... Please Any body give me the answer for my question. Is it possible to print the word "PRINT F", without using printf() statement in C-Language.
What is identifier in c?
a character or group of characters that defines a register,or a part of storage a) memory b) byte c) address d) linear list
Can we compile a program without main() function?
Why is %d used in c?