6236 Programmering I Agenda/Do While

From Teknologisk videncenter
Jump to: navigation, search

<system lang=Csharp> Int32 a = 0; do { a = a + 1; System.Console.WriteLine("a = " + a); } while (a < 10); System.Console.ReadKey(); </source>

 

a = 1
a = 2
a = 3
a = 4
a = 5
a = 6
a = 7
a = 8
a = 9
a = 10