Please help!!

I have to change

cout << MONTHS[0] << " " << actual[0] << " " << rain[0] << " " << diff[0] << endl;
cout << "________________________________________\n";
cout << MONTHS[1] << " " << actual[1] << " " << rain[1] << " " << diff[1] << endl;
and so on...


into a loop, I must not use numbers, instead I have to use [i]

i was trying this

void difference(double actual[], double avg[], double diff[], int size) {

difference(actual, rain, diff, 12);

for (int i = 0; i < size; i++)
{
diff[i] =( avg[i] - actual[i]);

}

Last edited on
So... what's your question?
I don't know what is your problem. I think you can format your code using the editor and clarify your problem
Topic archived. No new replies allowed.