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 |
without using control structures and control structures find the max and min of given 2 nos
what type of errors are checked during compilation
What is the difference between abs() and fabs() functions?
what is the difference between unix os and linux os
Q-1: Create a structure to specify data on students given below: Roll number, Name, Department, Course, Year of joining Assume that there are not more than 450 students in the college.
What are the different types of endless loops?
How do you view the path?
write function to reverse char array ... without using second array
why use functions a) writing functions avoids rewriting the same code over and over b) using functions it becomes easier to write programs and keep track of what they are doing c) a & b d) none of the above
What is a program flowchart?
Explain how do you generate random numbers in c?
what is a void pointer?