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

Import Java

Uploaded by

anishranjan363
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 views2 pages

Import Java

Uploaded by

anishranjan363
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/ 2

import java.util.

*;

public class mirror_matrix {

public static void main(String[] args) {

Scanner sc=new Scanner(System.in);

int i,j;

int m[][]=new int[5][5];

System.out.println("Enter the elements in a matrix: ");

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

for(j=0; j<4; j++)

m[i][j]=sc.nextInt();

System.out.println("The Matrix: ");

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

for(j=0; j<4; j++)

System.out.print(m[i][j]+ " ");

System.out.println();

System.out.println("The above matrix's MIRROR MATRIX: ");

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

for(j=3; j>=0; j-- )

System.out.print(m[i][j]+ " ");

}
System.out.println();

You might also like