0719-1
2023. 7. 19.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace HelloWorld
{
    internal class Program
    {
        static void Main(string[] args)
        {//출력하기전에 결과를 예상해보자
         //메모리에 저장하기 위해 변수를 사용
            string characterName = "홍길동";//변수에 값을 string type으로 저장: 변수를 선언하고 값을 할당
            //변수의 초기화
            Console.WriteLine("이름: "+characterName);//변수에 저장된 값 출력
            int level; //int 형 변수 선언 -> 저장할 공간이 생긴 것.
            level = 12; //변수에 값 저장(대입). 값을 level이라는 이름의 변수에 저장(값을 할당)
            Console.WriteLine("레벨: "+level);
        }
    }
}

결과

'C# 기초' 카테고리의 다른 글

캐스팅  (0) 2023.07.19
디아블로 아이템 사전  (0) 2023.07.19
Hand Axe  (0) 2023.07.19
문자열 보간  (0) 2023.07.19
결합연산자  (0) 2023.07.19
myoskin