C#/수업 내용
메서드 무기입수
HSH12345
2023. 1. 3. 16:08
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Study02
{
class App
{
public App()
{
Console.WriteLine("App\n\n\n");
GetItem("장검", 2);
GetItem("단검", 1);
GetItem("창", 3);
}
void GetItem(string weapon, int itemNum)
{
for(int i = 0; i < itemNum; i++)
{
Console.WriteLine("{0}을 획득 했습니다.", weapon);
}
Console.WriteLine("");
}
}
}