Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

in c# need help to Modify the design and program to allow for iteration. Increas

ID: 3669478 • Letter: I

Question

in c# need help to Modify the design and program to allow for iteration. Increase the number of guesses to 10 to solve the word. Display the word to the user with each letter as a special character such as ********. Create an array of correct letters guessed such as: char[] guessed = new char[26];

You will need counter also to keep track of how many letters are in the guessed array. You do not need to keep track of incorrectly guessed letters

{
            int score = 0;
            char sletter;
            string secretword;

            Console.WriteLine("Welcome to the hangman game !");
            Console.WriteLine("*****");

            for (int i = 1; i <= 10; i++)
            {
                Console.Write(" Please Enter a letter: ");
                sletter = char.Parse(Console.ReadLine());
                switch (sletter)
                {
                    case 'h':
                        Console.WriteLine("you entered correctly");
                        break;
                    case 'a':
                        Console.WriteLine("you entered correctly");
                        break;
                    case 'p':
                        Console.WriteLine("you entered correctly");
                        break;
                    case 'y':
                        Console.WriteLine(" you entered correctly");
                        break;
                    default:
                        Console.WriteLine(" you guessed incorrectly.");
                        score++;
                        break;
                }
            }

            Console.WriteLine(" Result: Number of Incorrect Guesses: " + score);
            Console.ReadLine();
        }

Explanation / Answer

The code you have typed has got errors in it..!! try this code it works..!! you can add from this c# code..!!