write a program to generate 1st n fibonacci prime number
Answers were Sorted based on User's Feedback
Answer / amit thakur
void main()
{
int x=1,i=0,n;
printf("Enter the value for n ");
scanf("%d",&n);
printf("\n%d ,",i);
for(;n>=1;--n)
{
x=x+i;
i=x-i;
printf("%d ,",x);
}
getch();
}
Is This Answer Correct ? | 6 Yes | 4 No |
Answer / namrata
void main()
{
int x=1,i=0,n;
printf("Enter the value for n ");
scanf("%d",&n);
printf("\n%d ,",i);
for(;n>=1;--n)
{
x=x+i;
i=x-i;
printf("%d ,",x);
}
getch();
}
Is This Answer Correct ? | 2 Yes | 2 No |
what do u mean by Direct access files? then can u explain about Direct Access Files?
What is the difference b/w Structure & Array?
How many bytes are occupied by near, far and huge pointers (dos)?
There are 8 billiard balls, and one of them is slightly heavier, but the only way to tell was by putting it on a weighing scale against another. What's the fewest number of times you'd have to use the scale to find the heavier ball?
write a function that accepts an integer/char array and an search item.If the search item is there in the array return position of array and value else return -1.without using other array,without sorting,not to use more than one loop?
Explain what are the standard predefined macros?
A woman had somany gloves and hats 22 red,34 blue, 45 white...there was power cut and she took a glove and how many gloves shud she take so that she gets a pair of glove fr each color??
main() { int x=5; printf("%d %d %d\n",x,x<<2,x>>2); }
11 Answers CISOC, CitiGroup, College School Exams Tests,
Write a function that accepts a sentence as a parameter, and returns the same with each of its words reversed. The returned sentence should have 1 blank space between each pair of words. Demonstrate the usage of this function from a main program. Example: Parameter: “jack and jill went up a hill” Return Value: “kcaj dna llij tnew pu a llih”
How to swap two values using a single variable ? condition: Not to use Array and Pointer ?
Multiply an Integer Number by 2 Without Using Multiplication Operator
what is c programming?