C Sharp

From Teknologisk videncenter
Revision as of 13:22, 5 December 2016 by Olso (talk | contribs)
Jump to: navigation, search

Kode eksempler - Gentelman klub

Console.WriteLine("Skriv din alder"); string alder = Console.ReadLine(); int age; age = Convert.ToInt32(alder);

if (((age > 20) && (age < 80)) || age != 21) {

     Console.WriteLine("Velkommen!");         

} else { Console.WriteLine("gå hjem og spil OverWatch"); }

Console.ReadLine();