I need help with my homework. The first part is to create two arrays that are random. Afterward I need to creat afunction that finds the Minimun and Maximum of the two arrays.
Here is my code:
#include <iostream>
#include <cstdlib>
#include <ctime>
using namespace std;
int
int main(void)
{
unsigned seed = time (0);
srand(seed);
cout<<"First Array"<<endl;
{int a1[45] = {1 + rand () % 45};
cout <<a1[45]<<endl;}
cout<<"SecondArray"<<endl;
{int a2[50] = {rand () %50};
if (a2[50] % 5 ==0)
cout<<a2[50]<<endl;}
cout<<"Third Array"<<endl;
int max(0);
if (a1[45] > max)
max = a1[45];{
cout<<"Maximum of a1[45] = " <<is]
After that I'm lost. Please help.