Noob question

Discussion in 'C#' started by georgewashere, Sep 5, 2010.

  1. georgewashere

    georgewashere New Member

    Joined:
    Sep 5, 2010
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Hi first off let me say I just started c# today and have absolutely no knowledge in coding other than HTML/CSS and minimal java scripting.

    I've gotten much discouragement from other forums on the internet about just "diving" into such a thing as programming but I would really like to do it.

    My question :

    In a book I am studying, the exercise tells me the loop executes 7 times.

    I just don't get it, I'm getting lost in it. I've reread the definitions and what not but I'm still not seeing how it executes 7 times, if someone could explain(this apparently very simple problem that I'm stumped with) that would be amazing.

    Loop #3
    Code:
    int j = 2;
    for (int i=1; i < 100; i = i * 2)
    {
       j = j - i;
       while (j < 25)
       {
            j = j + 5;
       }
    } 
    Using Microsoft Visual C# 2010 and I'm guessing .net 4.0?
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice