1 in main declare a variable n input an integer less than 10 from standardinput keyb 5346700
1. In main(), declare a variableN, input an integer less than 10 from standardinput (keyboard). Then, define a function Fibonacci tocalculate the Fibonacci number, which is: 0, 1, 1, 2, 3, 5,8, 13, 21…
E.g. if you enter a 10, yourprogram will report 34
Note:N will be used as an argument of the function. Youare required to use a recursive function tocalculate the result. Finally, return the result to main()function, and output the result in main().
2. In main(), define a two dimensional integer arrayN[5][5] which has 5 rows and 5 columns, a total of25 integer elements. Initialize the array by generating randomnumbers between 70 and 100 usingfunction rand() and assigning them to the arrayintegers. Then define two arrays: S[5] andA[5]; and use loops to calculate the sum andaverage of the numbers in each row of N[5][5](i.e. numbers that have the same row index), assign the results toS[5] and A[5], respectively.Output S[5] and A[5] results.
To generate the random numberbetween 70 and 100, you can use the following code:
#include
#include
#include
using namespace std;
int main()
{
srand((unsigned)time(0));
int random_integer;
for(int index=0; index
random_integer =(rand()%30)+70;
cout
}
}