반응형
SMALL
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Study01
{
class App
{
public App()
{
Console.WriteLine("App");
GetItems("장검",2);
GetItems("단검",1);
GetItems("창",3);
}
void GetItems(string weapon, int num )
{
for(int i =0; i < num; i++)
{
Console.WriteLine("{0}을 획득하였습니다.",weapon);
}
}
}
}
반응형
LIST
'C# > 수업 내용' 카테고리의 다른 글
고블린 공격 시나리오 과제 (메서드) (0) | 2023.01.03 |
---|---|
일반공격 크리티컬 공격 (메서드 반환) (0) | 2023.01.03 |
매서드 사용법 (0) | 2023.01.03 |
별찍기 2 (for문) (0) | 2023.01.03 |
별찍기 (for문) (0) | 2023.01.03 |