✍
using System;
namespace Hello
{
class Program
{
static void Main(string[] args)
{
int i;
double x;
i = 5;
x = 3.141592;
Console.WriteLine("i = " + i + ", x = " + x);
x = i;
i = (int)x;
Console.WriteLine("i = " + i + ", x = "+ x);
Console.ReadKey();
}
}
}
💻
'C# > C# 200제' 카테고리의 다른 글
[C# 200제] 009. Console.WriteLine 메서드로 여러 개의 값을 출력 (0) | 2023.07.18 |
---|---|
[C# 200제] 007. Console.WriteLine 메서드 (0) | 2023.07.16 |
[C# 200제] 005. 문자와 문자열 (0) | 2023.07.16 |
[C# 200제] 004. 변수 선언 및 자료형(Type) (0) | 2023.07.16 |
[C# 200제] 002. 비주얼스튜디오 설치하고 출력 (0) | 2023.07.15 |