27 lines
803 B
C#
27 lines
803 B
C#
using System;
|
|
using System.IO;
|
|
using System.Collections.Generic;
|
|
|
|
namespace Exercises_C_Sharp.E26_Mehrdimensionale_Arrays
|
|
{
|
|
class Exercise_6
|
|
{
|
|
static string[,] stringArray = new string[3,3];
|
|
|
|
public static void Start()
|
|
{
|
|
//Lassen Sie den Nutzer das zweidimensionale Array 'stringArray' mit (9, jeweils eine pro Feld) Eingaben befüllen
|
|
|
|
//Code START
|
|
for (int i = 0; i < stringArray.GetLength(0); i++)
|
|
for (int j = 0; j < stringArray.GetLength(1); j++)
|
|
stringArray[i, j] = Console.ReadLine() ?? "";
|
|
//Code ENDE
|
|
|
|
//Überprüfung:
|
|
foreach (var element in stringArray)
|
|
Console.Write(element + " - ");
|
|
}
|
|
|
|
}
|
|
} |