I'm trying to use switch. It works for all the cases except for one which has absolutely no difference with the others.
It tests the remaining from the division by 13 of the first array(int) and depending on that assigns specific values to the second one(Char).
public static char[] FindValue(int[] OCards) {
char[] OValue = new char[5];
int n;
for (int i = 0; i < 5; i++) {
n = OCards[i] % 13;
switch (n) {
case 0:
OValue[i] = 'A';
break;
case 1:
OValue[i] = '2';
break;
case 2:
OValue[i] = '3';
break;
case 3:
OValue[i] = '4';
break;
case 4:
OValue[i] = '5';
break;
case 5:
OValue[i] = '6';
break;
case 6:
OValue[i] = '7';
break;
case 7:
OValue[i] = '8';
break;
case 8:
OValue[i] = '9';
break;
case 9:
OValue[i] = '10'; //Error here 'unclosed character literal'
break;
case 10:
OValue[i] = 'V';
break;
case 11:
OValue[i] = 'D';
break;
case 12:
OValue[i] = 'R';
break;
}
}
return OValue;
}
10are two characters.10a single character??