import java.util.Scanner;
/*
需求:
打印you and me 的星形矩形
*/
class PrintDemo
{
public static void main(String[] args)
{
Scanner sc = new Scanner(System.in);
System.out.println("夜晚敲代码,只因节奏跟不上,请输出'行'吧!");
int me = sc.nextInt();
System.out.println("敲敲敲,萌萌哒,请输出'列'吧!");
int you = sc.nextInt();
print(me,you);
}
public static void print(int m,int n){
for(int x=1;x<=m;x++){
for(int y=1;y<=n;y++){
System.out.print("*");}
System.out.println();
}
}
}
|
|