In this problem, we have mapped array of strings, elements are mapped with its indices integers.
This is my code, it is working for the sample test case, but not for other test cases. kindly review and tell what is wrong with this code, or what is that I am missing in this question
My code
import java.util.*;
public class Main {
public static void main(String args[]) {
Scanner scn=new Scanner(System.in);
int num=scn.nextInt();
int a=num/10;
int b=num%10;
String[] table={ " ", β.+@$β, βabcβ, βdefβ, βghiβ, βjklβ , βmnoβ, βpqrsβ , βtuvβ, βwxyzβ};
String as=table[a];
String bs=table[b];
for(int i=0;i<as.length();i++)
{
for(int j=0;j<bs.length();j++)
{
System.out.print(as.charAt(i));
System.out.print(bs.charAt(j));
System.out.println();
}
}
}
}