Here is what I have so far.
#include <iostream.h>
int main() {
int i, total[3];
int myValue[3][3];
myValue[0][0] = 53000;
myValue[0][1] = 5;
myValue[0][2] = 1;
myValue[1][0] = 89000;
myValue[1][1] = 3;
myValue[1][2] = 2;
myValue[2][0] = 93000;
myValue[2][1] = 3;
myValue[2][2] = 3;
for (i = 0; i < 3; i++)
{
total[i] = (myValue[i][0]/1000) + (myValue[i][1] - myValue[i][2]);
}
cout << total[0] <<endl;
cout << total[1] <<endl;
cout << total[2] <<endl;
return 0;
}
I forgot a variable. I need to add a name in each of my arrays. But for some reason im getting an error saying I can't use a CHAR and a INT??? How can I do
myValue[0][0] = Greg;
myValue[0][1] = 53,000;
myValue[0][2] = 5;
myValue [0] [3] = 1;
When i print the result, I need the persons name to show up with the number. I been tryin to figure it out for myself for over an hour now