반응형
using System;
namespace Kor.Ofic.Bee.ConsoleApp1
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello World!");
Console.WriteLine("I Want Addition!. Please enter two numbers.");
Console.WriteLine("First number: ");
int num1 = int.Parse(Console.ReadLine()); // first number insert and conversion
Console.WriteLine("Second number: ");
int num2 = int.Parse(Console.ReadLine()); // second number insert and conversion
// {0} location Set num1 {1} location set num2
Console.WriteLine("Two number addition : {0} + {1} = {2}", num1, num2, num1+num2);
}
}
}
반응형
'C#' 카테고리의 다른 글
OpenFileDialog get Path and FileName (0) | 2021.03.09 |
---|---|
String interpolation (0) | 2021.02.19 |
C# Override (0) | 2020.07.15 |