namespace _21 { internal class Program { static void Main(string[] args) { //Deklaráció string[] kartya = new string[] { "VII", "VIII", "IX", "X", "Also", "Felso", "Kiraly", "Asz" }; int[] ertek = new int[] { 7, 8, 9, 10, 2, 3, 4, 11 }; int n, i, j, sum; string lap; bool jo; Console.WriteLine("21-es jatek"); Console.WriteLine("lapok:"); for (i = 0; i < 8; i++) { Console.Write(kartya[i] + "\t"); } Console.WriteLine(); Console.WriteLine("értékei"); for (i = 0; i < 8; i++) { Console.Write(ertek[i] + "\t"); } Console.WriteLine("Kérem a lapot!"); do { lap = Console.ReadLine(); j = 0; while (j < 8 && kartya[j] != lap) j++; if (j == 8) Console.WriteLine("Hibas lap "); else Console.WriteLine("a lap értéke: " + ertek[j]); } while (j == 8); } } }