Hello: I am trying to finish this project tonight..I need to 1. that program so
ID: 3544319 • Letter: H
Question
Hello: I am trying to finish this project tonight..I need to
1. that program so that the user can continue to enter values until the correct guess is made. After the user guesses the number correctly, display the number of guesses made
2. modify the GuessingGame2.cs program so that the player is criticized for making a dumb guess. For example, if the player guesses that the random number is 4 and is told that the guess is too low, and then the player subsequently makes a guess lower than 4, display a message that the user should have known not to make such a low guess.
Here is what I have so far:
namespace Guessing_Game2
{
class Program
{
static void Main(string[] args)
{
Int32 min = 0;
Int32 max = 0;
Int32 input = 0;
Int32 random = 0;
Int32 tries = 0;
Random randomNumberGenerator = new Random();
Console.Write("what do you want the min number to be?");
Console.ReadLine("Int32 = Guess: 0<5");
}
}
}
Explanation / Answer
GuessGame1 is sbelow:
namespace Guessing_Game2
{
class Program
{
static void Main(string[] args)
{
Int32 input = 0;
Int32 random = 0;
Random randomNumberGenerator = new Random();
random=randomNumberGenerator.Next();
for(int count=0;input==random;count++)
{
Console::WirteLine("Your Tries are"+count);
}
}
}
}
Guess Game 2:
namespace Guessing_Game2
{
class Program
{
static void Main(string[] args)
{
Int32 input = 0;
Int32 random = 0;
Random randomNumberGenerator = new Random();
random=randomNumberGenerator.Next();
for(int count=0;input==random;count++)
{
Console::ReadLine("Enter Guess Number"+input);
}
Switch(count)
{
Case:1
Console::WriteLine("Good Guess");
Break;
Case:2
Console::WriteLine("Low guess");
Break;
}
}
}
}
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.