here is what i have to do: take 2 double array of lenght 10 call a and b and return ture if they are equal and flase otherwise; and write a function that take a and b and return and array which store the sum of correspond elemets. can someone check if this correct or not or show me how to do to check?
here is what i got so far:
cosnt double NUM = 10
double a [NUM]
double b [NUM]
bool c
int d =0
for (d=0; d < 10; d++)
{
if (a[d] != b[d])
{
c= false
}
else
{
c=true
}
}
return 0;
2nd one is this:
const int NUM = 10
int a [NUM];
int b [NUM];
int c=0
for (int d = 0; d < e ; d+)
{
if (int e=0;e<b; e++)
{
c+=a+b;
}
}