write a program to generate 1st n fibonacci prime number
Answer Posted / 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 |
Post New Answer View All Answers
What is the auto keyword good for?
How do you declare a variable that will hold string values?
Is c high or low level?
How can I generate floating-point random numbers?
Why shouldn’t I start variable names with underscores?
#include main() { enum _tag{ left=10, right, front=100, back}; printf("left is %d, right is %d, front is %d, back is %d",left,right,front,back); }
Here is a good puzzle: how do you write a program which produces its own source code as output?
What is meant by initialization and how we initialize a variable?
What is formal argument?
What is the use of bit field?
What are the types of unary operators?
What is difference between arrays and pointers?
Why is a semicolon (;) put at the end of every program statement?
Write a client and server program in C language using UDP, where client program interact with the Server as given below: i) The client begins by sending a request to send a string of 8 characters or series of 7 numbers, the server sends back a characters or numbers as per the request of the client. ii) In case of series of 7 numbers: The client sends a multiplication of numbers, to the server. iii) In case of a string of 8 characters: The client sends a reverse order of string to the server.. iv) Server will send an acknowledgment to the client after receiving the correct answer
What is scanf_s in c?