0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

🔰【C#】基本的なプログラム(解答1-2)

Posted at

この記事の注意事項

この記事に記載の内容(解答)が模範解答というわけではありません。
あくまで自身の学習の過程での足跡的な内容で記載するものです。
そのため、記述が汚い箇所もあるかと思いますので悪しからず。

開発環境

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
続行するには何かキーを押してください . . .

参考記事

1週間で身につくC#言語の基本

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?