Skip to content

Instantly share code, notes, and snippets.

@DongguemYoo
Created May 6, 2020 05:16
Show Gist options
  • Save DongguemYoo/514d6c0690364ea7aed9cfc8c9b4e623 to your computer and use it in GitHub Desktop.
Save DongguemYoo/514d6c0690364ea7aed9cfc8c9b4e623 to your computer and use it in GitHub Desktop.
코딩테스트 연습 직사각형 별찍기.cs
//중간에 비우는게 아니라서 쉬운듯?
//중간에 비우는거도 할수있긴할듯!
//1분컷
using System;
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]);
string map="";
for(int i=0;i<b;i++)
{
for(int x=0;x<a;x++)
{
map +="*";
}
map +="\n";
}
Console.WriteLine("{0}", map);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment