C#
-
for문 연습 문제C#/수업과제 2022. 6. 10. 17:38
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Study02 { internal class Program { static void Main(string[] args) { int monsterHp = 10; int heroDamage = 2; Console.WriteLine("몇회 공격 하시겠습니까?"); string input = Console.ReadLine(); int attackTimes = Convert.ToInt32(input); for (int i = 0; i < attackTimes; i++) { monsterHp ..
-
늑대 미니게임C#/수업내용 2022. 6. 10. 15:49
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Study02 { internal class Program { static void Main(string[] args) { //당신의 이름은 무엇입니까? Console.WriteLine("당신의 이름은 무엇입니까?"); string name = Console.ReadLine(); //당신의 공격력은 몇입니까? (1~5) : Console.WriteLine("당신의 공격력은 몇입니까?(1~5)"); string damage = Console.ReadLine(); int damageNu..
-
디아블로 아이템 출력하기C#/수업과제 2022. 6. 9. 17:32
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Study01 { internal class Program { static void Main(string[] args) { //아이템 이름 //VEIL OF STEEL string itemName1 = "VEIL OF STEEL"; //등급 //Magic string itemGrade1 = "Magic"; //카테고리 //Helm string category = "Helm"; //최소 방어력 //21 int minArmor = 21; //최대 방어력 //24 int maxArmor ..