Search:

Type: Posts; User: Faz

Search: Search took 0.09 seconds.

  1. Thread: Looping Question

    by Faz
    Replies
    9
    Views
    4,863

    Re: Looping Question

    Let me hazard a guess as to what they do when n = 6 the first prints 1,2,3,4,5,6 the second prints 1,4 the third prints1,4,5,8 or something like that i is just an integer to keep track not the...
  2. Thread: Looping Question

    by Faz
    Replies
    9
    Views
    4,863

    Re: Looping Question

    Did I say print out i?
  3. Thread: Looping Question

    by Faz
    Replies
    9
    Views
    4,863

    Re: Looping Question

    The reason you only got 1 4 is because you are setting the loop to run until N > n while what you want to to is run it n times I would recommend you use a for loop.




    for(int i = 1; i <= n;...
  4. Thread: Looping Question

    by Faz
    Replies
    9
    Views
    4,863

    Re: Looping Question

    OK what are you being asked to do? Where are you setting n and what determines it? upByThrees(4) What does this tell you? Is that your whole code? Why would you want to get it to print out x number...
Results 1 to 4 of 4