Question: Solve Q1 part (a) and (b). Total Marks are 10 (5 each) Q1 (a). 0, 1, 1, 2, 3, 5, 8, 13... are the Fibonacci

 Solve Q1 part (a) and (b). Total Marks are 10 (5each) Q1 (a). 0, 1, 1, 2, 3, 5, 8, 13... are

Solve Q1 part (a) and (b). Total Marks are 10 (5 each) Q1 (a). 0, 1, 1, 2, 3, 5, 8, 13... are the Fibonacci numbers series as we learnt in the class. Write a C++program that takes/declares an array with the name fibnum[80] with 80 size and start filling it with the first 80 Fibonacci series. Now declare another fibar[80] which will copy those elements from fibnum[] which are multiple of 5 and count of the total numbers which are multiple of 5. Display first array completely and display fibar[] according to the size of the count only. 5 Clue: First, enter two numbers 0 and 1 manually in the array and then calculate the remaining numbers using the loop. Q1 (b).Write the following functions: 1- get() that takes two parameters: a pointer to a dynamic array and size, and stores the name entered by the user in the array. 2- print() that takes a pointer to a dynamically allocated array and prints the name. Note: use pointer notation to iterate through the array. (i.e. For looping) marks5

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!