/*
*题目2:假定输出单元图形为一正方形图案,请编写可以根据用户输入数量显示层级的组合
*作者:lihm
*日期:
*/
import java.util.Scanner;
public class Squra {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int input;
while(true){
System.out.println("请输入层数");
input= scan.nextInt();
System.out.println("┏┓");
for (int i=1;i<input ;i++ ){
System.out.print("┣");
for (int j=1;j<=i ;j++ ){
System.out.print("╋");
}
System.out.println("┓");
}
System.out.print("┗");
for(int i=1;i<input;i++){
System.out.print("┻");
}
System.out.println("┛");
System.out.print("继续输出请输入y否则按任意键退出");
String s;
s = scan.next();
if(!s.equalsIgnoreCase("y")){
break;
}
}
}
}