C# – While Loop

3
15



C# – While Loop
Watch more Videos at
Lecture By: Mr. Anadi Sharma, Tutorials Point India Private Limited.

Nguồn:https://wijstaanvooronzegrondrechten.org/

3 COMMENTS

  1. at 2:22 , Why it does not give a same result if we put ' count = count++ ' instead of ' count++ ' … and same for num++

  2. Brother learns a way to make things simple. I can bet no beginner will understand your example or your explanation.

  3. its so confusing make it simple

    Hope this code will help for Beginners…. 🙂

    using System;

    namespace Loops {
    class Program {
    static void Main(string[] args) {
    /* local variable definition */
    int a = 10;

    /* while loop execution */
    while (a < 20) {
    Console.WriteLine("value of a: {0}", a);
    a++;
    }
    Console.ReadLine();
    }
    }
    }
    When the above code is compiled and executed, it produces the following result −

    value of a: 10
    value of a: 11
    value of a: 12
    value of a: 13
    value of a: 14
    value of a: 15
    value of a: 16
    value of a: 17
    value of a: 18
    value of a: 19

LEAVE A REPLY

Please enter your comment!
Please enter your name here