lundi 19 septembre 2016

Bracket expected, but there are enough

            Random rnd = new Random();
            int card1 = rnd.Next(1, 3);
            int card2 = rnd.Next(1, 3);
            int card3 = rnd.Next(1, 3);
            if (card1 == card2 && card2 == card3 && card3 == card1) ;
            {
                Console.WriteLine("Gratulation!! Du hast den hauptpreis gewonnen!!!");
            }<<<<
        else if (card1 == card2 || card2 == card3 || card1 == card3) ;
            {
            Console.WriteLine("Gratulation!! Du hast 2 Gleiche gewonnen!!!");
            }<<<<
        else if (card1 != card2 || card2 !=card3 || card3 != card1) ;
            {
                Console.WriteLine("Du hast leider verloren...");
            }<<<<

It tells me:"} expected. I don't knok why. It also says possible wrong space ( or something like that.) I marked the "problematic" spots with <<<<.

Aucun commentaire:

Enregistrer un commentaire