SHOW:
|
|
- or go back to the newest paste.
| 1 | using System; | |
| 2 | ||
| 3 | namespace Lesson01 | |
| 4 | {
| |
| 5 | class Program | |
| 6 | {
| |
| 7 | static void Main(string[] args) | |
| 8 | {
| |
| 9 | WhileTest(); | |
| 10 | } | |
| 11 | ||
| 12 | private static void WhileTest() | |
| 13 | {
| |
| 14 | int i = 1; while (i <= 5) | |
| 15 | {
| |
| 16 | Console.WriteLine("The value of i = {0}", i);
| |
| 17 | i++; | |
| 18 | } | |
| 19 | } | |
| 20 | } | |
| 21 | } |