using System;
namespace foreach_sample
{
class MainClass
{
public static void Main(string[] args)
{
//foreachを使って、配列の値をすべて表示する
// 1. 配列を初期化
float[] weights = { 61.2f, 62.5f, 64.9f, 63.2f, 65.1f, 63.6f, 67.9f };
// 2. foreachを回す
//foreach (型名 変数名 in 配列名)
foreach (float w in weights)
{
Console.WriteLine(w);
}
}
}
}
More than 5 years have passed since last update.
Register as a new user and use Qiita more conveniently
- You get articles that match your needs
- You can efficiently read back useful information
- You can use dark theme
List of users who liked
00