I am working on a math tutoring program
that asks the user two random numbers from 10 to 100,
and asks them to key in the correct answer within 5 seconds .the program must ask ten questions showing them and then display the score

#include <cstdlib>
#include <ctime>
#include <iostream>
using std::cout;
using std::cin;
using std::endl;
long int random() {
srand((unsigned)time(0));
int random_integer;
random_integer = (rand()%100)+1;
return random_integer;
}
int main()
{
for(int index=0; index<10; index++) {
x = random();
y = random();
total = x+y;
cout<<"Enter answer: ";
cin>>answer;
if (answer == total)
cout<<"That is correct"<<endl;
else {
cout<<"The true answer is: "<<total<<endl;
}
}
return 0;
}

Write a C program that should create a 10 element array of random integers (0 to 9). The program should total all of the numbers in the odd positions of the array and compare them with the total of the numbers in the even positions of the array and indicate ...

Hi. so this is actually a continuation from another question of mineHere but i was advised to start a new thread as the original question was already answered.

This is the result of previous question answered :

I have a 2d matrix with dimension (3, n) called A, I want to calculate the normalization and cross product of two arrays (b,z) (see the code please) for each column (for the first column, then the second one and so on).
the function that I created to find the ...