0% found this document useful (0 votes)
4 views3 pages

Pract. 2

Uploaded by

Janeth Tarqui
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views3 pages

Pract. 2

Uploaded by

Janeth Tarqui
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 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