jeudi 25 juin 2015

Quiz with polish and english months

I'm doing a simple quiz where you getting an question "How is called month xxx in polish?". I've done an array list with the months, random which taking the month from the list, but I don't know how can I check if the typed month is correct. Any ideas? Here is my code with what I've done so far;

Random random = new Random();
            string[] miesiac = { "STYCZEŃ", "LUTY", "MARZEC", "KWIECIEŃ", "MAJ", "CZERWIEC", "LIPIEC", "SIERPIEŃ", "WRZESIEŃ", "PAŹDZIERNIK", "LISTOPAD", "GRUDZIEŃ" }; //months in polish
            string randommonth = (miesiac[random.Next(12)]);
            Console.WriteLine("Cześć, proszę powiedz mi jak jest " + randommonth + " po angielsku.");
            string answer = Console.ReadLine();

And here I am stuck because I do not know how to check if the answer is going to be correct or not.




Aucun commentaire:

Enregistrer un commentaire