코딩 테스트/Lv.0

문자열 반복해서 출력하기

gaon99 2024. 12. 30. 21:09

using System;

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

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

        String s1 = input[0];
        int a = Int32.Parse(input[1]);
        
        for(int i=0;i<a;i++)
        {
            Console.Write(s1);
        }

    }
}

'코딩 테스트 > Lv.0' 카테고리의 다른 글

덧셈식 출력하기  (0) 2024.12.31
특수문자 출력하기  (0) 2024.12.30
대소문자 바꿔서 출력하기  (0) 2024.12.30
a와 b 출력하기  (1) 2024.12.30
문자열 출력하기  (0) 2024.12.30