compute the nth mumber in the fibonacci sequence?
Answer Posted / sweety
main()
{ int a=0,b=1,c,n,i;
printf("enter nth number");
scanf("%d",&n);
for(i=1;i<=n;i++)
{
c=a+b;
printf("fibonacci series is %d",&c);
a=b;
b=c;
}
getch();
}
Is This Answer Correct ? | 5 Yes | 4 No |
Post New Answer View All Answers
Give basis knowledge of web designing ...
Is multithreading possible in c?
How will you print TATA alone from TATA POWER using string copy and concate commands in C?
What is the code for 3 questions and answer check in VisualBasic.Net?
What is the difference between malloc() and calloc()?
What are logical errors and how does it differ from syntax errors?
What is meant by operator precedence?
the constant value in the case label is followed by a a) semicolon b) colon c) braces d) none of the above
What is getch () for?
Explain what are compound statements?
design and implement a data structure and performs the following operation with the help of file (included 1000 student marks in 5 sub. and %also) 1.how many students are fail in all 5 subjects (if >35) 2. delete all student data those are fail in all 5 subjects. 3. update the grace marks (5 no. if exam paper is 100 marks) 4. arrange the student data in ascending order basis of marks. 5.insert double of deleted students with marks in the list.
program to convert a integer to string in c language'
Do pointers need to be initialized?
write a sorting prgm to sort 50 nos and sum them and also remove all the occurrences of 15 and print it?
4-Take two sets of 5 numbers from user in two arrays. Sort array 1 in ascending and array 2 in descending order. Perform sorting by passing array to a function mySort(array, sortingOrder). Then multiply both the arrays returned from function, using metric multiplication technique in main. Print result in metric format.