I have following code:
public static void main(String[] args) {
convert13to7(7);
}
public static int convert13to7(int grade) {
int newGrade = 0;
int[] scale13 = {00, 03, 5, 6, 7, 8, 9, 10, 11, 13};
int[] scale7 = {-3, 00, 00, 02, 4, 7, 7, 10, 12, 12};
for (int i = 0; i < scale13.length; i++) {
if (grade == scale13[i]) {
newGrade = scale7[i];
}
}
return newGrade;
}
The point of this code is to convert an old danish grade scale to a new one but the problem is that I don't get any output when using the convert13to7
function. Does anyone see the issue here?