using System; public class Test { public static void Main() { string[,] table3x3 = new string[3, 3]; string myString = "11A23A4A5A87A5"; int stringIndex = -1; bool immediatelyFollowsA = false; for (int row = 0; row < 3; row++) for (int col = 0; col < 3; col++) { while (myString[++stringIndex] == 'A') { immediatelyFollowsA = true; } if (immediatelyFollowsA) { table3x3[row,col] = myString[stringIndex].ToString(); immediatelyFollowsA = false; } } for (int row = 0; row < 3; row ++) { for (int col = 0; col < 3; col++) if (string.IsNullOrEmpty(table3x3[row,col])) Console.Write("[ ]"); else Console.Write("["+table3x3[row,col]+"]"); Console.WriteLine(); } } }