import java.util.Scanner;
import javax.swing.text.StyledEditorKit.ForegroundAction;
public class WorkDemo06 {
public static void main(String[] args) {
//定义一个4行4列的二维数组,逐个从键盘输入值,将对角线的值清0
Scanner sc=new Scanner(System.in);
int[][] nums=new int[4][4];
for (int i = 0; i < nums.length; i++) {
System.out.println("第"+(i+1)+"行");
for (int j = 0; j < nums[i].length; j++) {
System.out.println("第"+(j+1)+"个数");
nums[i][j]=sc.nextInt();
}
}
System.out.println("矩阵为");
for (int i = 0; i < nums.length; i++) {
for (int j = 0; j < nums[i].length;