Difference between revisions of "6236 Programmering I Agenda/Do While"
From Teknologisk videncenter
(Created page with "s") |
|||
Line 1: | Line 1: | ||
− | + | <system lang=Csharp> | |
+ | Int32 a = 0; | ||
+ | do | ||
+ | { | ||
+ | a = a + 1; | ||
+ | System.Console.WriteLine("a = " + a); | ||
+ | } while (a < 10); | ||
+ | System.Console.ReadKey(); | ||
+ | </source> | ||
+ | |||
+ | <pre style="background:rgba(0,0,0,1); color:#FFFFFF"> | ||
+ | |||
+ | a = 1 | ||
+ | a = 2 | ||
+ | a = 3 | ||
+ | a = 4 | ||
+ | a = 5 | ||
+ | a = 6 | ||
+ | a = 7 | ||
+ | a = 8 | ||
+ | a = 9 | ||
+ | a = 10 | ||
+ | |||
+ | </pre> |
Revision as of 12:08, 19 November 2015
<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