c#/수업 과제8 생성자 메서드 연습하기 using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; class ZUGGLRING { public ZUGGLRING() //생성자 { Console.WriteLine("저글링이 생산됩니다."); } } using System; class Program { static void Main(string[] args) { //라바 생성 되었습니다. //라바가 저글링 x2로 번퇴 합니다. //저글링이 생성 되었습니다. //저글링이 생성 되었습니다. LARVAR larvar = new LARVAR(); LARVAR larvar2; larvar2 = new LARV.. 2021. 8. 25. 연습과제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) { //1. 공격 2. 스킬 3. 도망 : 2 스킬을 사용 했습니다 Console.WriteLine("1.공격, 2.스킬, 3.도망"); int input = Convert.ToInt32(Console.ReadLine()); if (input == 1) { Console.WriteLine("공격을 사용 했습니다. "); } else if (input == 2) { Consol.. 2021. 8. 20. 변수와 if ~else 복습 변수. 변수선언 변수타입 변수명; ex) int damage; 변수 값 할당 변수명 = 값; ex) damage = 10; 출력 Console.WriteLine(값 또는 변수); ex) Console.WriteLine(damage); //문자 형식 변수 선언 char charLeft; charLeft = cinvert.tochar(left); console.writeLine(charLeft); *if문 특정한 조건이 맞을 때만 스크립트를 실행하고 싶다면 if를 사용. if (조건식) { 처리 } 조건식에 조건을 만족하면(참) ({}) 블록에 담긴 처리를 실행. 조건을 만족시키지 못하면(거짓) 처리를 실행하지 않고 다음 스크립트로 넘어간다. if 조건식에는 관계연산자를 사용할 수 있다 ==연잔자는 왼쪽과 .. 2021. 8. 20. 산술연산자 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 input1 = Console.ReadLine(); Console.Write("두번째 숫자를 입력하세요"); string input2 = Console.ReadLine(); int a = Convert.ToInt32(input1); in.. 2021. 8. 19. 입력 받기 복습 기본1 using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Helloworld { class Program { enum estate { ground, unground } static void Main(string[] args) { // 득점 횟수를 입력하세요: // 어시스트 횟수를 입력하세요: // 패스 횟수를 입력하세요: //득점: 2 //어시스트: 2 //패스: 80 Console.Write("득점 횟수를 입력하세요:"); string goal = Console.ReadLine(); Console.Write("어시스트 횟수를 입력하세요:.. 2021. 8. 18. 20210817 과제 1. 스타크래프트 고스트 2.스타크래프트 다크 탬플러 3.스타크래프트 히드라리스크 4. 리그오브 레전드 바론내셔 5.배틀그라운드 M416(무기) 6. 스타크래프트 프로브 7.메이플스토리 와일드 보어 아직 enum, const, bool 들이 계속 헷갈리고 자유롭게 사용하지 못함. 더 연습할 것. 2021. 8. 17. 20210816 과제 2. 3. 4. 5. 2021. 8. 17. 20210816 과제1 2021. 8. 16. 이전 1 다음