// --- 1 ---
using System;
 
class Program
{
    static void Main()
    {
        // 여기서 코드를 작성합니다
    }
}

// --- 2 ---
using System;
 
class Program
{
    static void Main()
    {
        Console.WriteLine("Hello C#");
    }
}

// --- 3 ---
using System;
 
class Program
{
    static void Main()
    {
        int a;
        a = 10;
    }
}

// --- 4 ---
using System;
 
class Program
{
    static void Main()
    {
        int a = 10;
        int b = 20;
        int c = a + b;
        Console.WriteLine(c);
    }
}

// --- 5 ---
using System;
 
class Program
{
    static void Main()
    {
        int a = 10;        // 정수
        int b = -20;       // 음수
        float c = 0.2f;    // 실수 (f를 붙임)
        double d = -3.0;   // 더 정밀한 실수
 
        Console.WriteLine(a + b);
        Console.WriteLine(c);
        Console.WriteLine(d);
    }
}

// --- 6 ---
using System;
 
class Program
{
    static void Main()
    {
        int money = 5000;
        int apple = 800;
        int count = money / apple;
        Console.WriteLine(count);
    }
}

// --- 7 ---
using System;
 
class Program
{
    static void Main()
    {
        char grade = 'A';
        string name = "홍길동";
 
        Console.WriteLine(grade);
        Console.WriteLine(name);
    }
}

// --- 8 ---
using System;
 
class Program
{
    static void Main()
    {
        bool isJumping = false;
        Console.WriteLine(isJumping);
 
        isJumping = true;
        Console.WriteLine(isJumping);
    }
}

// --- 9 ---
using System;
 
class Program
{
    static void Main()
    {
        Console.Write("이름을 입력하세요: ");
        string name = Console.ReadLine();
 
        Console.WriteLine("안녕하세요, " + name + "님!");
    }
}

// --- 10 ---
using System;
 
class Program
{
    static void Main()
    {
        Console.Write("나이를 입력하세요: ");
        string input = Console.ReadLine();
        int age = int.Parse(input);
 
        Console.WriteLine(age + 1);
    }
}

// --- 11 ---
using System;
 
class Program
{
    static void Main()
    {
        int a = 10;
        double b = a;        // 암시적 변환 (int → double)
        Console.WriteLine(b);
 
        double c = 3.7;
        int d = (int)c;       // 명시적 변환 (double → int)
        Console.WriteLine(d);
    }
}

// --- 12 ---
using System;
 
class Program
{
    static void Main()
    {
        const int MaxHp = 100;
        Console.WriteLine(MaxHp);
    }
}

// --- 13 ---
using System;
 
class Program
{
    static void Main()
    {
        int money = 1000;
        int candy = 200;
 
        if (money > candy)
        {
            Console.WriteLine("캔디를 살 수 있습니다.");
        }
        else
        {
            Console.WriteLine("캔디를 살 수 없습니다.");
        }
    }
}

// --- 14 ---
using System;
 
class Program
{
    static void Main()
    {
        int money = 1000;
        int candy = 200;
        int point = 10;
 
        if (money < candy || point > 7)
        {
            Console.WriteLine("캔디를 살 수 있습니다.");
        }
        else
        {
            Console.WriteLine("캔디를 살 수 없습니다.");
        }
    }
}

// --- 15 ---
using System;
 
class Program
{
    static void Main()
    {
        int money = 5;
        int candy = 7;
        int point = 2;
 
        if (money > candy)
        {
            Console.WriteLine("1-캔디를 살 수 있습니다.");
        }
        else if (money == candy)
        {
            Console.WriteLine("2-캔디를 살 수 있습니다.");
        }
        else if (point >= 2)
        {
            Console.WriteLine("3-캔디를 살 수 있습니다.");
        }
        else
        {
            Console.WriteLine("캔디를 살 수 없습니다.");
        }
    }
}

// --- 16 ---
using System;
 
class Program
{
    static void Main()
    {
        Console.Write("나이를 입력하세요: ");
        int age = int.Parse(Console.ReadLine());
 
        if (age >= 20)
            Console.WriteLine("성인");
        else
            Console.WriteLine("미성년자");
    }
}

// --- 17 ---
using System;
 
class Program
{
    static void Main()
    {
        Console.Write("첫 번째 정수: ");
        int a = int.Parse(Console.ReadLine());
        Console.Write("두 번째 정수: ");
        int b = int.Parse(Console.ReadLine());
        Console.Write("세 번째 정수: ");
        int c = int.Parse(Console.ReadLine());
 
        if (a > b && a > c)
            Console.WriteLine("가장 큰 수는 " + a + "입니다.");
        else if (b > a && b > c)
            Console.WriteLine("가장 큰 수는 " + b + "입니다.");
        else
            Console.WriteLine("가장 큰 수는 " + c + "입니다.");
    }
}

// --- 18 ---
using System;
 
class Program
{
    static void Main()
    {
        int score = 3;
 
        switch (score)
        {
            case 1:
                Console.WriteLine("C등급입니다.");
                break;
            case 2:
                Console.WriteLine("B등급입니다.");
                break;
            case 3:
                Console.WriteLine("A등급입니다.");
                break;
            default:
                Console.WriteLine("등급을 매길 수 없습니다.");
                break;
        }
    }
}

// --- 19 ---
using System;
 
class Program
{
    static void Main()
    {
        Console.Write("메뉴를 선택하세요 (1-3): ");
        int menu = int.Parse(Console.ReadLine());
 
        switch (menu)
        {
            case 1:
                Console.WriteLine("햄버거를 선택하셨습니다.");
                break;
            case 2:
                Console.WriteLine("피자를 선택하셨습니다.");
                break;
            case 3:
                Console.WriteLine("치킨을 선택하셨습니다.");
                break;
            default:
                Console.WriteLine("잘못된 선택입니다.");
                break;
        }
    }
}

// --- 20 ---
using System;
 
class Program
{
    static void Main()
    {
        int clear = 0;
 
        while (clear < 5)
        {
            Console.WriteLine("현재까지 게임을 " + clear + "번 클리어 했습니다.");
            clear = clear + 1;
 
            if (clear == 5)
            {
                Console.WriteLine("레벨이 올라갑니다.");
            }
        }
    }
}

// --- 21 ---
using System;
 
class Program
{
    static void Main()
    {
        int cupramen = 4;
 
        while (true)
        {
            Console.Write("돈을 넣으세요: ");
            int money = int.Parse(Console.ReadLine());
 
            if (money == 1500)
            {
                Console.WriteLine("컵라면을 줍니다");
                cupramen = cupramen - 1;
            }
            else if (money > 1500)
            {
                Console.WriteLine("컵라면을 주고, 거스름돈 " + (money - 1500) + "원을 돌려 줍니다");
                cupramen = cupramen - 1;
            }
            else
            {
                Console.WriteLine("돈이 모자랍니다. 돈을 돌려줍니다");
            }
 
            if (cupramen == 0)
            {
                Console.WriteLine("컵라면이 다 떨어졌습니다.");
                break;
            }
        }
    }
}

// --- 22 ---
using System;
 
class Program
{
    static void Main()
    {
        int sum = 0;
 
        while (true)
        {
            Console.Write("숫자를 입력하세요 (0 입력 시 종료): ");
            int num = int.Parse(Console.ReadLine());
 
            if (num == 0) break;
            sum += num;
        }
 
        Console.WriteLine("총합: " + sum);
    }
}

// --- 23 ---
using System;
 
class Program
{
    static void Main()
    {
        Console.Write("학생수를 입력하시오: ");
        int people = int.Parse(Console.ReadLine());
 
        int count = 1;
        int sum = 0;
 
        while (count <= people)
        {
            Console.Write(count + "번 학생의 점수를 입력하세요: ");
            int num = int.Parse(Console.ReadLine());
            sum += num;
            count++;
        }
 
        Console.WriteLine("총합계는 " + sum + "입니다.");
        Console.WriteLine("평균은 " + ((double)sum / people) + "입니다.");
    }
}

// --- 24 ---
using System;
 
class Program
{
    static void Main()
    {
        for (int i = 0; i < 5; i++)
        {
            Console.Write(i + " ");
        }
    }
}

// --- 25 ---
using System;
 
class Program
{
    static void Main()
    {
        Console.Write("정수를 입력하세요: ");
        int num = int.Parse(Console.ReadLine());
        int sum = 0;
 
        for (int i = 1; i <= num; i++)
        {
            sum += i;
        }
 
        Console.WriteLine("합: " + sum);
    }
}

// --- 26 ---
using System;
 
class Program
{
    static void Main()
    {
        int i = 0;
 
        while (i < 3)
        {
            int j = 0;
            while (j < 4)
            {
                Console.Write(j + " ");
                j++;
            }
            Console.WriteLine();
            i++;
        }
    }
}

// --- 27 ---
using System;
 
class Program
{
    static void Main()
    {
        int i = 1;
 
        while (i <= 3)
        {
            int j = 1;
            while (j <= i)
            {
                Console.Write("*");
                j++;
            }
            Console.WriteLine();
            i++;
        }
    }
}

// --- 28 ---
using System;
 
class Program
{
    static void Main()
    {
        int dan = 2;
 
        while (dan <= 5)
        {
            int num = 1;
            Console.WriteLine("=== " + dan + "단 ===");
 
            while (num <= 9)
            {
                Console.WriteLine(dan + " x " + num + " = " + (dan * num));
                num++;
            }
            Console.WriteLine();
            dan++;
        }
    }
}

// --- 29 ---
using System;
 
class Program
{
    static void Main()
    {
        for (int i = 0; i < 3; i++)
        {
            for (int j = 0; j < 4; j++)
            {
                Console.Write(j + " ");
            }
            Console.WriteLine();
        }
    }
}

// --- 30 ---
using System;
 
class Program
{
    static void Main()
    {
        for (int i = 1; i <= 5; i++)
        {
            // 공백 출력
            for (int j = 1; j <= 5 - i; j++)
            {
                Console.Write(" ");
            }
            // 숫자 출력
            for (int k = 1; k <= 2 * i - 1; k++)
            {
                Console.Write(k);
            }
            Console.WriteLine();
        }
    }
}

// --- 31 ---
// 배열을 사용하지 않을 때
int score1 = 85;
int score2 = 90;
int score3 = 78;
int score4 = 92;
int score5 = 88;
 
// 배열을 사용할 때
int[] score = { 85, 90, 78, 92, 88 };

// --- 32 ---
// 방법 1: new로 크기만 지정 (모든 요소가 0으로 채워짐)
int[] arr1 = new int[5];
 
// 방법 2: 값과 함께 초기화 (크기는 자동으로 결정)
int[] arr2 = { 10, 20, 30, 40, 50 };
 
// 방법 3: new와 값을 함께 사용
int[] arr3 = new int[] { 1, 2, 3 };

// --- 33 ---
using System;
 
class Program
{
    static void Main()
    {
        int[] arr1 = new int[5];
        int[] arr2 = { 10, 20, 30, 40, 50 };
 
        Console.WriteLine(arr1[0]);      // 기본값 0
        Console.WriteLine(arr2[0]);
        Console.WriteLine(arr2.Length);  // 배열의 크기
    }
}

// --- 34 ---
using System;
 
class Program
{
    static void Main()
    {
        int[] arr = { 1, 2, 3, 4, 5 };
        Console.WriteLine(arr.Length);
    }
}

// --- 35 ---
using System;
 
class Program
{
    static void Main()
    {
        int[] arr = { 10, 20, 30, 40, 50 };
 
        Console.WriteLine(arr[0]);  // 첫 번째 요소
        Console.WriteLine(arr[1]);  // 두 번째 요소
        Console.WriteLine(arr[4]);  // 마지막 요소
 
        arr[2] = 100;               // 요소 값 변경
        Console.WriteLine(arr[2]);
    }
}

// --- 36 ---
using System;
 
class Program
{
    static void Main()
    {
        int[] arr = { 1, 4, 8, 9, 13 };
 
        for (int i = 0; i < arr.Length; i++)
        {
            Console.Write(arr[i] + " ");
        }
    }
}

// --- 37 ---
using System;
 
class Program
{
    static void Main()
    {
        int[] arr = { 34, 67, 43, 89, 55, 3, 45 };
        int max = arr[0];
 
        for (int i = 1; i < arr.Length; i++)
        {
            if (max < arr[i])
            {
                max = arr[i];
            }
        }
 
        Console.WriteLine("가장 큰 수는 " + max + "입니다.");
    }
}

// --- 38 ---
using System;
 
class Program
{
    static void Main()
    {
        int[] arr = { 10, 20, 30, 40, 50 };
        int sum = 0;
 
        for (int i = 0; i < arr.Length; i++)
        {
            sum += arr[i];
        }
 
        double average = (double)sum / arr.Length;
        Console.WriteLine("합: " + sum);
        Console.WriteLine("평균: " + average);
    }
}

// --- 39 ---
using System;
 
class Program
{
    static void Main()
    {
        int[] arr = { 1, 4, 8, 9, 13 };
 
        foreach (int num in arr)
        {
            Console.Write(num + " ");
        }
    }
}

// --- 40 ---
using System;
using System.Collections.Generic;
 
class Program
{
    static void Main()
    {
        List<int> scoreList = new List<int>();
 
        scoreList.Add(85);
        scoreList.Add(90);
        scoreList.Add(78);
 
        Console.WriteLine(scoreList.Count);   // 리스트의 개수
        Console.WriteLine(scoreList[0]);      // 인덱스로 접근
 
        scoreList.Remove(90);                 // 값 90 제거
        Console.WriteLine(scoreList.Count);
    }
}

// --- 41 ---
using System;
using System.Collections.Generic;
 
class Program
{
    static void Main()
    {
        List<string> items = new List<string>();
        items.Add("포션");
        items.Add("검");
        items.Add("방패");
 
        foreach (string item in items)
        {
            Console.WriteLine(item);
        }
    }
}

// --- 42 ---
using System;
using System.Collections.Generic;
 
class Program
{
    static void Main()
    {
        List<int> scoreList = new List<int>();
 
        for (int i = 1; i <= 5; i++)
        {
            Console.Write(i + "번째 점수: ");
            int score = int.Parse(Console.ReadLine());
            scoreList.Add(score);
        }
 
        int sum = 0;
        foreach (int score in scoreList)
        {
            sum += score;
        }
 
        double average = (double)sum / scoreList.Count;
        Console.WriteLine("합계: " + sum);
        Console.WriteLine("평균: " + average);
    }
}

// --- 43 ---
using System;
 
class Program
{
    static void Main()
    {
        // 2차원 배열 선언: 3행 4열 (C#은 콤마로 구분합니다)
        int[,] arr = {
            { 1, 2, 3, 4 },
            { 5, 6, 7, 8 },
            { 9, 10, 11, 12 }
        };
 
        Console.WriteLine(arr[0, 0]);  // 첫 번째 행, 첫 번째 열
        Console.WriteLine(arr[1, 2]);  // 두 번째 행, 세 번째 열
        Console.WriteLine(arr[2, 3]);  // 세 번째 행, 네 번째 열
    }
}

// --- 44 ---
using System;
 
class Program
{
    static void Main()
    {
        string name = "홍길동";
        int age = 20;
 
        Console.WriteLine(name + "님은 " + age + "살입니다.");
    }
}

// --- 45 ---
using System;
 
class Program
{
    static void Main()
    {
        string name = "홍길동";
        int age = 20;
 
        Console.WriteLine($"{name}님은 {age}살입니다.");
    }
}

// --- 46 ---
using System;
 
class Program
{
    static void Main()
    {
        Console.Write("이름을 입력하세요: ");
        string name = Console.ReadLine();
        Console.Write("나이를 입력하세요: ");
        int age = int.Parse(Console.ReadLine());
 
        Console.WriteLine($"안녕하세요, {name}님! 당신은 {age}살입니다.");
    }
}

// --- 47 ---
using System;
 
class Program
{
    static void Main()
    {
        string str = "  Hello World  ";
 
        Console.WriteLine(str.Length);
        Console.WriteLine(str.Trim());
        Console.WriteLine(str.ToUpper());
        Console.WriteLine(str.ToLower());
        Console.WriteLine(str.Contains("World"));
        Console.WriteLine(str.Replace("World", "C#"));
    }
}

// --- 48 ---
using System;
 
class Program
{
    static void Main()
    {
        string str1 = "Hello";
        string str2 = "Hello";
 
        if (str1 == str2)
        {
            Console.WriteLine("문자열이 같습니다.");
        }
        else
        {
            Console.WriteLine("문자열이 다릅니다.");
        }
    }
}

// --- 49 ---
using System;
 
class Program
{
    static void Main()
    {
        string word = "UnityEngine";
        Console.WriteLine(word.Substring(0, 5));  // 0번부터 5글자
 
        string sentence = "나는 유니티를 배운다";
        string[] words = sentence.Split(' ');
 
        foreach (string w in words)
        {
            Console.WriteLine(w);
        }
    }
}

// --- 50 ---
using System;
 
class Program
{
    static void Main()
    {
        string str = "Hello";
 
        foreach (char ch in str)
        {
            Console.Write(ch + " ");
        }
    }
}

// --- 51 ---
using System;
 
class Program
{
    static void Main()
    {
        string str = "Hello World";
        int count = 0;
 
        foreach (char ch in str)
        {
            if (char.IsUpper(ch))
            {
                count++;
            }
        }
 
        Console.WriteLine("대문자 개수: " + count);
    }
}

// --- 52 ---
using System;
 
class Program
{
    static void Main()
    {
        string[] names = { "홍길동", "김철수", "이영희" };
 
        for (int i = 0; i < names.Length; i++)
        {
            Console.WriteLine($"{i + 1}번: {names[i]}");
        }
    }
}

// --- 53 ---
using System;
using System.Collections.Generic;
 
class Program
{
    static void Main()
    {
        List<string> names = new List<string>();
 
        for (int i = 1; i <= 3; i++)
        {
            Console.Write($"{i}번 이름: ");
            names.Add(Console.ReadLine());
        }
 
        Console.WriteLine();
        Console.WriteLine("입력한 이름:");
        foreach (string name in names)
        {
            Console.WriteLine(name);
        }
    }
}

// --- 54 ---
using System;
 
class Program
{
    // 함수 정의
    static int Add(int a, int b)
    {
        return a + b;
    }
 
    static void Main()
    {
        int result = Add(10, 20);  // 함수 호출
        Console.WriteLine(result);
    }
}

// --- 55 ---
using System;
 
class Program
{
    // 형태 1: 매개변수 없고, 리턴 값 없음
    static void PrintHello()
    {
        Console.WriteLine("Hello!");
    }
 
    // 형태 2: 매개변수 없고, 리턴 값 있음
    static int GetNumber()
    {
        return 100;
    }
 
    // 형태 3: 매개변수 있고, 리턴 값 없음
    static void PrintSum(int a, int b)
    {
        Console.WriteLine(a + b);
    }
 
    // 형태 4: 매개변수 있고, 리턴 값 있음
    static int Add(int a, int b)
    {
        return a + b;
    }
 
    static void Main()
    {
        PrintHello();
        int num = GetNumber();
        Console.WriteLine(num);
        PrintSum(40, 50);
        int result = Add(40, 50);
        Console.WriteLine(result);
    }
}

// --- 56 ---
using System;
 
class Program
{
    static bool IsEven(int num)
    {
        if (num % 2 == 0)
            return true;
        else
            return false;
    }
 
    static void Main()
    {
        Console.Write("정수를 입력하세요: ");
        int num = int.Parse(Console.ReadLine());
 
        if (IsEven(num))
            Console.WriteLine("짝수입니다.");
        else
            Console.WriteLine("홀수입니다.");
    }
}

// --- 57 ---
using System;
 
class Program
{
    static void PrintArray(int[] arr)
    {
        foreach (int num in arr)
        {
            Console.Write(num + " ");
        }
        Console.WriteLine();
    }
 
    static void Main()
    {
        int[] arr = { 1, 2, 3, 4, 5 };
        PrintArray(arr);
    }
}

// --- 58 ---
using System;
 
class Program
{
    static void DoubleArray(int[] arr)
    {
        for (int i = 0; i < arr.Length; i++)
        {
            arr[i] = arr[i] * 2;  // 원본 배열 수정
        }
    }
 
    static void Main()
    {
        int[] arr = { 1, 2, 3, 4, 5 };
 
        Console.Write("원본: ");
        foreach (int num in arr) Console.Write(num + " ");
        Console.WriteLine();
 
        DoubleArray(arr);
 
        Console.Write("변경 후: ");
        foreach (int num in arr) Console.Write(num + " ");
        Console.WriteLine();
    }
}

// --- 59 ---
using System;
 
class Program
{
    static void TryChange(int num)
    {
        num = 999;  // 복사본만 바뀜
    }
 
    static void Main()
    {
        int x = 10;
        TryChange(x);
        Console.WriteLine(x);  // 여전히 10
    }
}

// --- 60 ---
using System;
 
class Program
{
    static int SumArray(int[] arr)
    {
        int sum = 0;
        foreach (int num in arr)
        {
            sum += num;
        }
        return sum;
    }
 
    static void Main()
    {
        int[] arr = { 10, 20, 30, 40, 50 };
        int total = SumArray(arr);
        Console.WriteLine("합: " + total);
    }
}

// --- 61 ---
using System;
 
class Program
{
    static void Count(int a)
    {
        if (a == 0)
        {
            return;  // 종료 조건
        }
        Console.Write(a + " ");
        Count(a - 1);  // 자기 자신 호출
    }
 
    static void Main()
    {
        Count(5);
    }
}

// --- 62 ---
using System;
 
class Program
{
    static int Sum(int n)
    {
        if (n == 0)
        {
            return 0;  // 종료 조건
        }
        return n + Sum(n - 1);  // n + (n-1까지의 합)
    }
 
    static void Main()
    {
        int result = Sum(10);
        Console.WriteLine("1부터 10까지의 합: " + result);
    }
}

// --- 63 ---
// 클래스를 사용하지 않을 때
string name;
int age;
int score;
 
// 클래스를 사용할 때
class Student
{
    public string name;
    public int age;
    public int score;
}

// --- 64 ---
using System;
 
class Student
{
    public string name;
    public int age;
    public int score;
}
 
class Program
{
    static void Main()
    {
        Student s1 = new Student();
        s1.name = "홍길동";
        s1.age = 20;
        s1.score = 95;
 
        Console.WriteLine($"이름: {s1.name}, 나이: {s1.age}, 점수: {s1.score}");
    }
}

// --- 65 ---
class Player
{
    public string name;   // 클래스 밖에서 접근 가능
    private int hp;       // 클래스 안에서만 접근 가능
}

// --- 66 ---
using System;
 
class Student
{
    public string name;
    public int age;
 
    // 생성자: 클래스와 이름이 같고, 반환 타입이 없습니다
    public Student(string name, int age)
    {
        this.name = name;
        this.age = age;
    }
}
 
class Program
{
    static void Main()
    {
        Student s1 = new Student("홍길동", 20);
        Console.WriteLine($"이름: {s1.name}, 나이: {s1.age}");
    }
}

// --- 67 ---
using System;
 
class Player
{
    private int hp;
 
    public int Hp
    {
        get { return hp; }
        set { hp = value < 0 ? 0 : value; }  // 음수가 되지 않도록 방지
    }
}
 
class Program
{
    static void Main()
    {
        Player p = new Player();
        p.Hp = -10;
 
        Console.WriteLine(p.Hp);
    }
}

// --- 68 ---
using System;
 
class Player
{
    private string name;
 
    public string Name
    {
        get { return name; }
        set
        {
            if (value == "")
                name = "이름없음";   // 빈 값이면 기본 이름으로
            else
                name = value;
        }
    }
}
 
class Program
{
    static void Main()
    {
        Player p = new Player();
        p.Name = "";            // 빈 값을 넣어 봄
        Console.WriteLine(p.Name);
 
        p.Name = "홍길동";
        Console.WriteLine(p.Name);
    }
}

// --- 69 ---
public int Hp { get; set; }

// --- 70 ---
using System;
 
class Monster
{
    public static int count = 0;  // 모든 몬스터가 공유하는 값
 
    public Monster()
    {
        count++;
    }
}
 
class Program
{
    static void Main()
    {
        new Monster();
        new Monster();
        new Monster();
 
        Console.WriteLine(Monster.count);
    }
}

// --- 71 ---
using System;
 
class Animal
{
    public string name;
 
    public void Eat()
    {
        Console.WriteLine(name + "가 먹이를 먹습니다.");
    }
}
 
class Dog : Animal
{
    public void Bark()
    {
        Console.WriteLine(name + "가 짖습니다.");
    }
}
 
class Program
{
    static void Main()
    {
        Dog d = new Dog();
        d.name = "초코";
 
        d.Eat();   // Animal에게서 물려받은 함수
        d.Bark();  // Dog 자신의 함수
    }
}

// --- 72 ---
public class Player : MonoBehaviour
{
    void Start() { ... }
    void Update() { ... }
}

// --- 73 ---
enum State
{
    Idle,
    Run,
    Jump
}
using System;
 
enum State
{
    Idle,
    Run,
    Jump
}
 
class Program
{
    static void Main()
    {
        State current = State.Idle;
        Console.WriteLine(current);
 
        current = State.Jump;
        Console.WriteLine(current);
    }
}

// --- 74 ---
using System;
 
enum State
{
    Idle,
    Run,
    Jump
}
 
class Program
{
    static void Main()
    {
        State current = State.Run;
 
        switch (current)
        {
            case State.Idle:
                Console.WriteLine("가만히 있습니다.");
                break;
            case State.Run:
                Console.WriteLine("달리고 있습니다.");
                break;
            case State.Jump:
                Console.WriteLine("점프 중입니다.");
                break;
        }
    }
}

// --- 75 ---
struct Point
{
    public int x;
    public int y;
}
using System;
 
struct Point
{
    public int x;
    public int y;
}
 
class Program
{
    static void Main()
    {
        Point p1 = new Point();
        p1.x = 10;
        p1.y = 20;
 
        Console.WriteLine($"({p1.x}, {p1.y})");
    }
}

// --- 76 ---
using System;
 
struct PointS { public int x; }
class PointC { public int x; }
 
class Program
{
    static void Main()
    {
        PointS s1 = new PointS();
        s1.x = 10;
        PointS s2 = s1;   // 값이 복사됨
        s2.x = 99;
        Console.WriteLine(s1.x);  // 10, 그대로
 
        PointC c1 = new PointC();
        c1.x = 10;
        PointC c2 = c1;   // 참조가 공유됨
        c2.x = 99;
        Console.WriteLine(c1.x);  // 99, 같이 바뀜
    }
}

// --- 77 ---
using System;
 
struct Point
{
    public int x;
    public int y;
}
 
class Program
{
    static Point AddPoints(Point p1, Point p2)
    {
        Point result = new Point();
        result.x = p1.x + p2.x;
        result.y = p1.y + p2.y;
        return result;
    }
 
    static void Main()
    {
        Point p1 = new Point();
        p1.x = 10;
        p1.y = 20;
 
        Point p2 = new Point();
        p2.x = 30;
        p2.y = 40;
 
        Point sum = AddPoints(p1, p2);
        Console.WriteLine($"합: ({sum.x}, {sum.y})");
    }
}

// --- 78 ---
using UnityEngine;
using System.Collections.Generic;
 
public enum PlayerState
{
    Idle,
    Run,
    Jump
}
 
public class Player : MonoBehaviour
{
    public int Hp { get; set; } = 100;
    public float speed = 5f;
 
    private PlayerState state = PlayerState.Idle;
    private List<string> items = new List<string>();
 
    void Start()
    {
        items.Add("포션");
        Debug.Log($"게임 시작! HP: {Hp}");
    }
 
    void Update()
    {
        if (Hp <= 0)
        {
            state = PlayerState.Idle;
            Debug.Log("플레이어가 쓰러졌습니다.");
        }
 
        switch (state)
        {
            case PlayerState.Run:
                transform.Translate(Vector3.forward * speed * Time.deltaTime);
                break;
        }
    }
 
    void TakeDamage(int damage)
    {
        Hp -= damage;
    }
}