团体程序设计天梯赛-练习集 L1-015 跟奥巴马一起画方块

  • Post author:
  • Post category:其他


在这里插入图片描述

在这里插入图片描述

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner (System.in);
		double n= sc.nextDouble();
		String str = sc.next();
		for(int i=0;i<Math.round(n/2);i++) {
			for(int j=0;j<n;j++) {
				System.out.print(str);
			}
			System.out.println();
		}
		
	}

}



版权声明:本文为kiront原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。