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 are disadvantages of C language.
how to swap two integers 1 and 32767 without using third variable
What is getch () for?
Devise a program that inputs a 3 digit number n and finds out whether the number is prime or not. Find out its factors.
Write a program to identify if a given binary tree is balanced or not.
why array index always starts from zero??
When is a void pointer used?
what is differnence b/w macro & functions
Where are some collections of useful code fragments and examples?
what is the difference between. system call and library function?
application attempts to perform an operation?
c program to subtract between two numbers without using '-' sign and subtract function.