Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

IPO, FLOWCHART & PSEUDO help plz static void Main(string[] args) { string word = happy; char[] array = new char[word.Length]; for (int i = 0;

IPO, FLOWCHART & PSEUDO help plz

static void Main(string[] args) { string word = "happy"; char[] array = new char[word.Length]; for (int i = 0; i < word.Length; i++) array[i] = '*'; Console.WriteLine("Welcome to the hangman game! "); int score = 0; for (int j = 0; j < 10; j++) { Console.WriteLine(array); Console.WriteLine("Enter a letter please"); //char ch = (char) Console.Read(); string str = Console.ReadLine(); int found = 0; for (int i = 0; i < word.Length; i++) { if (str[0] == word[i]) { array[i] = word[i]; found = 1; } } if (found == 0) { Console.WriteLine("You guessed incorrectly!"); } else { // Score is used keep track of how many letters are in the guessed array score++; Console.WriteLine("You guessed a letter correctly!"); } if (word.Equals(new string(array))) { Console.WriteLine(array); Console.WriteLine("Congratulations! You have figured out the word! "); Console.ReadLine();//To keep console window open, your last line of code } } } } }

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Probabilistic Databases

Authors: Dan Suciu, Dan Olteanu, Christopher Re, Christoph Koch

1st Edition

3031007514, 978-3031007514

Students also viewed these Databases questions

Question

Define Administration and Management

Answered: 1 week ago

Question

What is the purpose of the Salary Structure Table?

Answered: 1 week ago

Question

What is the scope and use of a Job Family Table?

Answered: 1 week ago