Hi, im new at c++ and I would like to make two arrays that have 8 values each and each value is generated by ran(). After this I would like to sum each value in their current positions and pass them to a third array. How could I do this?
Ok, I have made the program but now my problem is that I dont understand how to use the ran() to make each value of the array be random. Any advice for that? I made the program for the user to input the numbers but I need it to be generated random. Here is what I made.
using namespace std;
int main()
{
int firstarray[5];
int secondarray[5];
int sumarrays[5];
int count;
cout<<"Please enter the values in 1st array: ";
for(count=0; count<5;count++)
{
cin>>firstarray[count];
}
cout<<"Please enter the values in 2st array: ";
for(count=0; count<5;count++)
{
cin>>secondarray[count];
}