본문 바로가기
c#/수업 내용

반환값이 있는 메서드 작성 (scv 미네랄, 가스 캐기, 좌표) - 하는중

by 이지훈26 2021. 8. 25.
using System;

namespace HelloWorld
{
    class Program
    {

        static void Main(string[] args)
        {
            Console.WriteLine("SCV로 이동하려는 좌표를 입력해주세요.");
            Console.Write("x축 좌표를 입력하세요.:");
            int input0 = Convert.ToInt32(Console.ReadLine());
            Console.Write("y축 좌표를 입력하세요.:");
            int input1 = Convert.ToInt32(Console.ReadLine());

            ScvMove(input0, input1);
            Console.ReadLine();

        }
        static void ScvMove(int X, int Y)
        {
            Console.WriteLine("scv가 (0,0)에서 {0},{1}로 이동합니다.", X, Y);
        }

    }
}

일단은 여기까지 내일 더 생각해보고 마무리 하기.

 

Helloworld2.exe
0.00MB