2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

はじめに

プログラミング入門の資料を作っていたら、配列操作の練習になる課題を見つけました

問題

1 行目に整数 N が与えられます。
2 行目以降に、N 組の整数 a_i と b_i が N 行で与えられます。(1 ≦ i ≦ N)
8 組目の a_i と b_i を出力してください。

実装したソース

実装したソースは下記の通りです

using System;

class Program
{
    static void Main()
    {
        // 自分の得意な言語で
        // Let's チャレンジ!!
        int line = Int32.Parse(Console.ReadLine());
        string[] array1 = new string[line];
        for(int i=0;i<line;i++){
            array1[i] = Console.ReadLine();
        }
        Console.WriteLine(array1[7]);
    }
}

実行結果

813.jpg

最後に

C#で実装しました

2
2
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
2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?