java-dbr
  Imprimir 1 matriz
 
import java.util.*;
public class unamatrizz
{
public static void main(){
int ren_herrera, col_herrera, a, i, maxa,  mina ;
 
int ma_herrera[][] = new int[3][3];
 
Scanner leer= new Scanner(System.in);
 
mina=1000;
maxa=0;
a=-1;
for (ren_herrera=0;ren_herrera<=2;ren_herrera++){
i=0;
a++;
for (col_herrera=0;col_herrera<=2;col_herrera++){
System.out.print("Matriz A ["+a+"]["+i+"]: ");
ma_herrera[ren_herrera][col_herrera] = leer.nextInt();
i++;
if(ma_herrera[ren_herrera][col_herrera]<=mina){
mina=ma_herrera[ren_herrera][col_herrera];
}
if(maxa<=ma_herrera[ren_herrera][col_herrera]){
maxa=ma_herrera[ren_herrera][col_herrera];
}
}
}
 
System.out.println("");
System.out.println("Matriz A: ");
for(ren_herrera=0;ren_herrera<=2;ren_herrera++){
System.out.println(" ");
for(col_herrera=0;col_herrera<=2;col_herrera++){
System.out.print(ma_herrera[ren_herrera][col_herrera]+" ");
}
}
 
}
}
 
  Hoy habia 23 visitantes (31 clics a subpáginas) ¡Aqui en esta página!  
 
Este sitio web fue creado de forma gratuita con PaginaWebGratis.es. ¿Quieres también tu sitio web propio?
Registrarse gratis