Search:

Type: Posts; User: Ryan15

Search: Search took 0.09 seconds.

  1. Replies
    4
    Views
    601

    Re: Question on math's loop sequence

    Thanks for the help. How do I close this thread?

    --- Update ---

    Shortening the code

    --- Update ---

    this code doesn't print out 1
  2. Replies
    4
    Views
    601

    Question on math's loop sequence

    (b) 1 3 6 10 15 21
    I want my loop to have this output.
    Is there an easier way than my current code?
    for(int i=1;i<=6;i++)
    {
    int d=i*(i+1)/2;
    System.out.print(d+ " ");...
Results 1 to 2 of 2