Search:

Type: Posts; User: Parranoia

Search: Search took 0.08 seconds.

  1. Replies
    11
    Views
    1,019

    [SOLVED] Re: Do-while loop help

    Everybody has been there buddy :) it'll only get better and better with time. Glad to help out.
  2. Replies
    11
    Views
    1,019

    [SOLVED] Re: Do-while loop help

    Variables created inside a loop will only exist while that loop is running. Take this as an example:


    int num = 0;

    for (int i = 0; i < 5; i++)
    {
    num = i * i;
    int sum = 2;
    }
  3. Replies
    11
    Views
    1,019

    [SOLVED] Re: Do-while loop help

    Just think about the problem a bit more.
    You are wanting to start at a given number, square it and print it out, then subtract one from it.

    So just some example of pseudocode:

    Create variable...
Results 1 to 3 of 3