직사각형 별찍기

[문제 Link] https://programmers.co.kr/learn/courses/30/lessons/12969

문제 설명


이 문제에는 표준 입력으로 두 개의 정수 n과 m이 주어집니다. 별(*) 문자를 이용해 가로의 길이가 n, 세로의 길이가 m인 직사각형 형태를 출력해보세요.


제한사항


n과 m은 각각 1000 이하인 자연수입니다.


입출력 예


5 3


입출력 예 설명


*****
*****
*****


제한시간 안내


null

전체 코드


using System;
using System.Collections.Generic;
using System.Linq;

public class Example
{
    public static void Main()
    {
        String[] s;

        Console.Clear();
        s = Console.ReadLine().Split(' ');

        int a = Int32.Parse(s[0]);
        int b = Int32.Parse(s[1]);

        
        for(int i =0;i<b;i++)
            Console.WriteLine(string.Concat(Enumerable.Repeat("*",a)));
    }
}


결과