case 'A':
x,y = Option1(Games,TotalGames);
Games[TotalGames, 0] = x;
TotalGames++;
break;
Firstly, this is my current case A and my measly attempt to change the array value. Every time I do this it says the array is not modifiable.
int Option1(int a[100][2],int c) {
int x;
int y;
printf("Enter your score:\n");
scanf("%i", &x);
printf("Enter your opponent's score:\n");
scanf("%i", &y);
return x,y;
}
This is the function that calculates the values that will connect to specific array sections. Note: we have to have separate functions for this.
void Option2(int a[100][2], int c) {
int i, j = 0;
int win=0, loss=0, tie=0;
for (i = 0; i < c; i++) {
if (a[i, j] > a[i, j+1]) {
win++;
}
else if (a[i, j] < a[i, j+1]) {
loss++;
}
else {
tie++;
}
}
printf("Current Records:\n");
printf("Wins: %i\nLosses: %i\nTies:%i \n", win, loss, tie);
return;
}
This is the code that keeps registering it all as ties. This is what made me realize none of the array values were sharing. Anyone got any tips?