Create a program that first asks for two integer values A and B. Your program should then pick a random number between A and B and keep it secret. Then ask the user to guess what the number is. The program should continue to ask the user to guess, until the user gets the correct answer. Each time the user makes an incorrect guess, the program should tell the user if the guess was too high, or too low. The program should also tell the user if the guess was outside the range between A and B. Important Notes 1. The numbers A and B must be different. The program should keep asking for new inputs until it gets two different numbers. 2. A and/or B could be negative. The program should work with negative values. 3. The numbers A and B could be given in either order (A < B or A > B). The program should not care and be able to accept them in either order. 4. The program should pick a number at random between A and B inclusive (the random number might be either A or B). 5. The program should tell the user if a guess is
1
Expert's answer
2012-10-10T11:37:29-0400
using System; using System.Collections.Generic; using System.Linq; using System.Text;
namespace Answer { class Program { & static void Main(string[] args) & { Random _random = new Random(DateTime.Now.Millisecond);
Comments
Leave a comment