in Education by
write a program to print fibonacci series . write a program to search an element within the array using binary search Select the correct answer from above options

1 Answer

0 votes
by
 
Best answer
Answer: Programme to print fibonacci series: #include int main() { int n1=0,n2=1,n3,i,number; printf(“Enter the number of elements:”); scanf(“%d”,&number); printf(“\n%d %d”,n1,n2);//printing 0 and 1 for(i=2;i<number;++i)//loop starts from 2 because 0 and 1 are already printed { n3=n1+n2; printf(” %d”,n3); n1=n2; n2=n3; } return 0; }

Related questions

0 votes
    Write a program to generate first 20 terms of Fibonacci series and store them in single dimension array. Display ... from the array Select the correct answer from above options...
asked Dec 10, 2021 in Education by JackTerrance
0 votes
    write the steps to search the 13 from the following element using binary search 2,4,5,8,9,11,12,13,15,18,21,22,25,29,30 Select the correct answer from above options...
asked Dec 13, 2021 in Education by JackTerrance
0 votes
    Write a program to store 10 names in an array. Arrange these in alphabetical orderby sorting. Print the sorted list. ... , LUCY, etc. Select the correct answer from above options...
asked Dec 12, 2021 in Education by JackTerrance
0 votes
    search element 20 30 40 60 70 80 90 100 element in an array find the element 20 Select the correct answer from above options...
asked Nov 29, 2021 in Education by JackTerrance
0 votes
    write a program in Python to print the sum of the following series: s=1+x+x^2+x^3+…..+x^n Select the correct answer from above options...
asked Dec 9, 2021 in Education by JackTerrance
0 votes
    Write a program to accept string from user and search a given character from string without using find() function Select the correct answer from above options...
asked Nov 30, 2021 in Education by JackTerrance
0 votes
    write a java program to print areaof an equilateral triangle . (without using scanner) Select the correct answer from above options...
asked Dec 31, 2021 in Education by JackTerrance
0 votes
    Write a program to convert a decimal number into binary number using function Select the correct answer from above options...
asked Dec 21, 2021 in Education by JackTerrance
0 votes
    write a program to input a number and print table of the number using while loop Select the correct answer from above options...
asked Dec 31, 2021 in Education by JackTerrance
0 votes
    Write a program in python to insert ten friends name in a list, then print 3rd, 5th and 9th value from the list (using data structure) Select the correct answer from above options...
asked Dec 14, 2021 in Education by JackTerrance
0 votes
    Using nested loop write a program to print the following pattern on the screen. 12345 23451 34512 45123 51234 Select the correct answer from above options...
asked Dec 13, 2021 in Education by JackTerrance
0 votes
    Develop a java program that will print the series (16*1)+(14*2)…(4*7)..Only ANEEK MITRA WILL ANSWER! Select the correct answer from above options...
asked Nov 26, 2021 in Education by JackTerrance
0 votes
    write a Java program to input 10 non-zero numbers in an array and display the count of even and odd numbers. URGENT! Select the correct answer from above options...
asked Dec 31, 2021 in Education by JackTerrance
0 votes
    Write a Numpy program to create an array to 10 zeros,10 ones,10 fives. Select the correct answer from above options...
asked Dec 12, 2021 in Education by JackTerrance
...