0

How tô show the position of a char on the screen?

Plis, I need help, it is a program to alphabet soup, and show example( 3,1), (3,2),(3,3).

7th Mar 2022, 2:33 PM
Maria Blanco
3 Respostas
0
public String generateSoup(String intro) { String salida = ""; for (int i = 0; i < soup.length; i++) { for (int j = 0; j < soup.length; j++) { salida += " " + soup[i][j] + " "; } salida += "\n"; } for (int i = 0; i < soup.length; i++) { for (int j = 0; j < soup.length; j++) { if (i+j==soup.length-1) { salida += soup[i][j] + " "; String palabra = ""; if (intro.equals(salida)) { palabra += intro; salida += palabra + "este"; //System.out.println(salida.indexOf(j)); } } } } return salida; } public String FilColum() { String nuevo = ""; for (int i = 0; i < soup.length; i++) { for (int j = 0; j < soup.length; j++) { nuevo += "[ " + soup[i][j] + " ]"; } nuevo += "\n"; } for (int i = 0; i < soup.length; i++) { for (int j = 0; j < soup.length; j++) { nuevo += soup[j][i] + " "; } nuevo += "\n"; } return nuevo; }
7th Mar 2022, 4:22 PM
Maria Blanco