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 to find out the union of two character arrays?
What is n in c?
How to run c Program without using IDE of c. means if program made in notepad.then how to compile by command prompt.
Write a program that takes a 3 digit number n and finds out whether the number 2^n + 1 is prime, or if it is not prime find out its factors
What is the role of this pointer?
What are the similarities between c and c++?
Given an unsigned integer, find if the number is power of 2?
can we declare a variable in different scopes with different data types? answer in detail
What are operators in c?
What are the application of c?
AMMONG THE 4 STROAGE CLASSES IN C, WHICH ONE FASTEST?
What is an array in c?