• Enter a do-while loop and generate a random, byte-sized, value in the range of
0 to 255. Store the random value in a variable of type byte. Display the value
in hex as shown below.
• The user will input a string containing 1's and 0's. Use a do-while loop to
ensure that the length of the string is 8 characters; if it is not, honk the
speaker and display an error message in yellow, and obtain new input.
An invalid guess is not counted as one of the five hex values. The hex value
for which an incorrect number of bit was entered will be repeated again, as
shown below.
• Convert the string to a byte-sized number. Compare the number with the random
value. If the two values are the same, display a message indicating a correct
result and increment the number of correct responses. If the values are
different, display a message indicating that the user's response was incorrect.
• Continue looping until the user has been presented with five hex values.
• Display the number of correct responses.
so far i have this:
string sInput;
Random rndGen = new Random();
byte byhex = (byte)rndGen.Next(256);
byte byInput = Convert.ToByte(sInput, 2);
Console.Title = "ICA15 - Hex Quiz";
Console.WriteLine("{0, 40}", "ICA15 - Hex Quiz");
Console.WriteLine("\nInput the binary equivalent to the following ten hex values.");
Console.WriteLine("\nThe binary equivalent to {0} is ", byhex);
byInput = byte.Parse(Console.ReadLine());
the last writeline is not showing...