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 |
which is the best site or book for learning C...and i need the content for C..how to get the good programming skills....? can plz suggest me....
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?
what is pointer ? what is the use of pointer?
Tell me when is a void pointer used?
Write a C program that defines a 2-dimentional integer array called A [50][50]. Then the elements of this array should randomly be initialized either to 1 or 0. The program should then print out all the elements in the diagonal (i.e. a[0][0], a[1][1],a[2][2], a[3][3], ……..a[49][49]). Finally, print out how many zeros and ones in the diagonal.
By using C language input a date into it and if it is right?
Given an unsigned integer, find if the number is power of 2?
Is return a keyword in c?
Can you assign a different address to an array tag?
Explain the difference between strcpy() and memcpy() function?
what is pointer
How can I ensure that integer arithmetic doesnt overflow?