C# (72) 썸네일형 리스트형 계산기 만들기 using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace HelloWorld { class Program { static void Main(string[] args) { Console.WriteLine("-------덧셈뺄셈 계산기-------"); Console.Write("첫번째 숫자를 입력하세요 : "); string number1 = Console.ReadLine(); float num1 = Convert.ToSingle(number1); Console.Write("두번째 숫자를 입력하세요 : "); string number2 = .. 문자입력받기 변수선언을 더하기도. using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace HelloWorld { class Program { static void Main(string[] args) { Console.Write("알파벳중 하나를 입력하세요(소문자): "); ConsoleKeyInfo info = Console.ReadKey(); ConsoleKey key = info.Key; char keyChar = info.KeyChar; Console.WriteLine(); Console.WriteLine("info.Key: {0},{1}", .. 입력받기 연습문제풀이 및 다른접근시도 1. using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace HelloWorld { class Program { static void Main(string[] args) { Console.Write("공격력을 입력하세요. : "); string attack = Console.ReadLine(); float attackF = Convert.ToSingle(attack); Console.WriteLine("공격력 : {0}", attackF); } } } 2. using System; using System.Collections.Generi.. 입력받기 ReadLine using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace HelloWorld { class Program { static void Main(string[] args) { //목표 //아이디 : hong //비밀번호 : 123456 //성별 : 남 Console.Write("아이디를 입력하세요 : "); Console.ReadLine(); string id = Console.ReadLine(); Console.Write("비밀번호를 입력하세요 : "); Console.ReadLine(); string pw = Console.ReadLine(.. 과제2 1. 리그오브레전드 - 가렌 using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace HelloWorld { class Program { static void Main(string[] args) { //변수 선언과 값 할당// int minHealth = 620; int maxHealth = 2048; int minHealthRege = 8; float maxHealthRege = 16.5f; int minArmor = 36; int maxArmor = 87; int minMagicResist = 32; float maxMagicResis.. 정보들 변수로 저장하고 출력 - 스타크래프트 오브젝트 1. 시즈탱크 using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace HelloWorld { class Program { enum eMode { Siege, Tank } static void Main(string[] args) { eMode mode = eMode.Tank; string name = "SiegeTank"; string race = "Terran"; int sight = 10; float moveSpeed = 4.1f; char hotKey = 'T'; bool isDie = false; Console.WriteLine(".. 이틀째 수업중연습 Goliath정보 using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace HelloWorld { class Program { static void Main(string[] args) { string index1 = "Unit"; string indexUnit1 = "Race"; string unit = "Terran"; string indexUnit2 = "Role"; string role = "Armored Assault Walker"; string indexUnit3 = "Armament"; string indexArmament1 = "Twin 30m.. 과제1 1. 이후 메모장 캡쳐는 생략하겠습니다. using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace HelloWorld { class Program { static void Main(string[] args) { //변수설정 및 값 할당 string name = "AIDAN'S REVENGE"; string category = "Axe"; string subCategory = "1-hand"; float dps = 10.4f; string dpsDescript = "Damage Per Second"; int minDamage = 6; int.. 코딩연습 *목표 결과물 Blacksmith (Level 1) One of 7 Magic Properties (varies) [34 - 39]% chance to inflict Bleed You gain 39% damage (2) Set +2% Life +20% Experience. (2% at level 70) *메모장에 옮기기 변수 -> 레벨 : 1 변하지 않는거 -> Blacksmith (Level 레벨) int Level = 1; Console.WriteLine("Blacksmith (Level {0})", Level); -------------------------------------------------------------- One of 7 Magic Properties (varies) 변수 -> 속.. 코딩방식1 using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace HelloWorld { class Program { static void Main(string[] args) { //실수형 변수 hp 정의 float hp; //hp변수에 값 12.5 할당 hp = 12.5f; //접미사 f붙여주기 //정수형 변수 damage 정의를 하고 값을 할당 int damage = 10; //damage변수의 값 출력 Console.WriteLine(damage); //hp변수의 값 출력 Console.WriteLine(hp); //변수 damage값과 변수.. 이전 1 ··· 4 5 6 7 8 다음