write a program to generate 1st n fibonacci prime number
Answer Posted / 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 |
Post New Answer View All Answers
What are the complete rules for header file searching?
How does free() know explain how much memory to release?
What is the difference between functions getch() and getche()?
What are the types of operators in c?
1234554321 1234 4321 123 321 12 21 1 1 12 21 123 321 1234 4321 1234554321
Explain that why C is procedural?
What is the purpose of macro in C language?
How do you search data in a data file using random access method?
provide an example of the Group by clause, when would you use this clause
Difference between macros and inline functions? Can a function be forced as inline?
Which is not valid in C a) class aClass{public:int x;}; b) /* A comment */ c) char x=12;
Create a structure to specify data on students as given below: Roll number, Name, Department, Course, and Year of joining. Assume that there are not more than 450 students in the collage. (a) Write a function to print the names of all students who joined in the last 3 years. (b) Write a function to print the data of a student whose roll numbers are divisible by 4.
write a program to rearrange the array such way that all even elements should come first and next come odd
if p is a string contained in a string?
What is auto keyword in c?