Here is what I have
#include <iostream.h>
int main() {
int i, total[3];
int myValue[3][3];
myValue[0][0] = 53,000;
myValue[0][1] = 5;
myValue[0][2] = 1;
myValue[1][0] = 89,000;
myValue[1][1] = 3;
myValue[1][2] = 2;
myValue[2][0] = 93,000;
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[i] <<endl;
return 0;
}
For some reason, I can't get the array to print at all.....It justcomes up with the initial value of 3, Im fairly new to programming.
Original Problem
I have the formula A/1000 + B - C. I need write a program that readsa the file and determines a priority number (like above). Then the prorgam needs to build a priority queue using the priority number and prints a list in accending order.