d
同じを使用して値を出力する必要がありますConsole.WriteLine
。しかし、出力の値ではなく結果d
のみを取得しています。どのような方法でこれを達成できますか?
namespace ConsoleApplication2
{
class Program
{
static void Main(string[] args)
{
int a;
int b;
Console.WriteLine("Please Enter the first Digit");
a = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("Please Enter the Second Digit");
b = Convert.ToInt32(Console.ReadLine());
int d = a + b;
Console.WriteLine("Result",(d));
}
}
}