发布网友 发布时间:2024-10-24 02:17
共1个回答
热心网友 时间:2024-11-05 01:02
public static void main(String[] args)throws Exception{
Scanner scr=new Scanner(System.in);
System.out.println("输入M");
int m=scr.nextInt();
System.out.println("输入N");
int n=scr.nextInt();
for (int i = 0; i < m; i++) {
for (int j = 0; j < n; j++) {
System.out.print("*");
}
System.out.println();
}
}