[Level1] 직사각형 별찍기

[Level1] 직사각형 별찍기

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17

import java.util. Scanner ; class Solution { public static void main( String [] args) { Scanner sc = new Scanner ( System . in ); int a = sc.nextInt(); int b = sc.nextInt(); // repeat() from Java11 String star = "*" ; String aString = star.repeat(a); for ( int i = 0 ; i < b; i + + ){ System . out . println (aString); } } } Colored by Color Scripter

from http://jungyijun.tistory.com/130 by ccl(A) rewrite - 2021-10-15 04:28:09