この記事の注意事項
この記事に記載の内容(解答)が模範解答というわけではありません。
あくまで自身の学習の過程での足跡的な内容で記載するものです。
そのため、記述が汚い箇所もあるかと思いますので悪しからず。
開発環境
OS:Windows10 Pro 64bit
IDE:VisualStudio Community 2015
問題
以下のプログラムを変更し、実行結果は同じでも、処理が一行しかないような形にプログラムを変更しなさい。
Pro1_2/Program.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Problem1_2
{
class Program
{
static void Main(string[] args)
{
Console.Write("123");
Console.Write("456");
Console.WriteLine("789");
}
}
}
コンソール
123456789
解答
Ex1_2/Program.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Ex1_2
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("123456789");
}
}
}
コンソール
123456789
続行するには何かキーを押してください . . .