0
1

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 5 years have passed since last update.

配列とループ処理について質問

Posted at

質問です。

要素数が20の1次元配列に整数100~119を順に格納するには
どのようなコードを書けばよいでしょうか?

ループ処理は必ず使いたいです。

ちなみに、以下のようなコードを書きましたが、そこから先が
でてこず困っています。

int num = new int[20];

for(int i=100; i<120; i++)
{
  num[]=i;
}
Console.WriteLine(num[]);

0
1
2

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
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?