Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
450 B
3
Indexable
int min = 1;
int max = 10;

Random random = new Random();
int number = random.Next(min, max);

Console.WriteLine("Write a number between 1 and 10");
int numb = Int32.Parse(Console.ReadLine());

if (number == numb)
{
    Console.WriteLine("Du gissade rätt");
}
if else (number < numb)
            {
    Console.WriteLine("Du gissade högt");
        }
else (number > numb)
            {
    Console.WriteLine("Du gissade lågt");