Posted by: 6ixMediaSA Category: Code Comments: 0

using System;
class Program {
    static void Main() {
        int secret = new Random().Next(1, 11), g = 0;
        while (g != secret) {
            Console.Write("Guess 1-10: ");
            g = int.Parse(Console.ReadLine());
            Console.WriteLine(g < secret ? "Higher!" : g > secret ? "Lower!" : "Correct!");
        }
    }
}

Leave a Reply

Your email address will not be published. Required fields are marked *

Let’s Get in Touch

We’re interested in talking
about your business.