字母图形

来源:互联网 发布:leaflet.js 编辑:程序博客网 时间:2024/06/10 09:24


import java.util.*;
public class 字母图形 {


public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int n = in.nextInt();
int m = in.nextInt();
for (int i = 0; i < n; i++) {
for (int j = 0; j < m; j++) {
System.out.print((char) ((int) 'A' + Math.abs(i - j)));
}
System.out.println();
}
}
}


0 0
原创粉丝点击