public class MainClass {
public int maze(char d) {
if (d <= 'N') {
if (d == 'E')
return 2;
return 1;
} else if (d == 'S')
return 3;
else if (d == 'W')
return 4;
return 0;
}
}
A. The input of 'A' produces an output of 1.
B. The input of 'X' produces an output of 0.
C. The input of 'D' produces an output of 0.
D. The method fails to compile due to syntax errors.
|