Search:

Type: Posts; User: Stayawake

Search: Search took 0.10 seconds.

  1. Replies
    11
    Views
    1,671

    Re: Consecutive number addition

    I've coded your problem and I will list the steps I took so you can program it.
    note that type conversions may be needed.

    1. you read the number into a variable
    2a. make a loop
    2b. in the loop...
  2. Replies
    11
    Views
    1,671

    If given a input which contains an upperbound,...

    If given a input which contains an upperbound, you could something along the lines like this:


    Int UpperBound = input
    Int Sum

    For(int i; i < UpperBound; i++){
    Sum += i
    }
Results 1 to 2 of 2