You are viewing a single comment's thread. Return to all comments →
For the Java people wondering how to accept the String matrix, here is a way,
` char c[][]=new char[n][n]; String s[]=new String[n];
for(int i=0;i<n;i++){ s[i]=sc.next(); } for(int i=0;i<n;i++){ int k=0; for(int j=0;j<n;j++){ c[i][j]=s[i].charAt(k); k++; }}
Seems like cookies are disabled on this browser, please enable them to open this website
Cavity Map
You are viewing a single comment's thread. Return to all comments →
For the Java people wondering how to accept the String matrix, here is a way,
` char c[][]=new char[n][n]; String s[]=new String[n];