So Σ 1...4 = (1 + 4) × 4 ÷ 2.(first element + last element) × how many elements ÷ 2
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
Darrin Altman wrote:
For example, if the user inputs 4, the program will generate four digits, like 1 2 3 4.
Kristjan Toots wrote:
// Instead incrementing getInt by 1, do it by 2
I have added some tags.Kristjan Toots wrote:Darrin, please use code tags. It will make reading so much more easier. . . .
Talk sense to a fool and he calls you foolish. -Euripides A foolish tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
|