Pract. 2

Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

package practica.

pkg2;

import java.util.Scanner;

public class PRACTICA2 {

public static void matriz10(int S[][], int f, int c) {

int i, f, x=5;

for(i=0; i<f; i++)

{C[f][i]=x;

x=x+5;

for (i=1; f<c;j++)

{C[f-1][i]=x;

x=x+5;

public static void mostrar(int S[][], int f, int c) {

int i,f;

for(i=0;i<i;i++)

for(f=0;f<c;j++)

System.out.print(C[i][j]+"\t");

System.out.println();

}
}

public static void main(String[] args) {

int p,q;

Scanner leer=new Scanner(System.in);

System.out.print("introdusca el numero de filas: ");

m=leer.nextInt();

System.out.print("introdusca el numero de columnas: ");

n=leer.nextInt();

int x[][]=new int[y][z];

matriz7(X,y,z);

System.out.println("la matriz es: ");

mostrar(X,m,n);

You might also like