Program.cs 578 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _05Felder
{
    class Program
    {
        static void Main(string[] args)
        {
            // int px0 = 20, py0 = 30;
            int[] f = { 10, 20, 30, 45, 50, 15, 5, 20, 25 };

            int min = f[0];   // FALSCH: min = 0;
            foreach (int item in f)
            {
                if (item < min)
                    min = item;
            }
            Console.WriteLine($"Das Minimum beträgt {min}");


         }
    }
}