package 第三章; import java.util.Scanner; public class 蛇形填数 { public static void main(String[] args) { // TODO Auto-generated method stub Scanner in=new Scanner(System.in); int n=in.nextInt(); int a[][]=new int[n][n]; int x=0,y=n-1; int t=1; a[0][n-1]=…