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...
Type: Posts; User: Stayawake
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...
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
}