Package de.hdm_stuttgart.sd1.sum
Class Summing
java.lang.Object
de.hdm_stuttgart.sd1.sum.Summing
Summing up integer values.
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
Summing
public Summing()
-
-
Method Details
-
main
- Parameters:
args
- unused
-
getSum
Summing up all integers starting from 0 up to and including a given limit Example: Let the limit be 5, then the result is 1 + 2 + 3 + 4 + 5- Parameters:
limit
- The last number to include into the computed sum- Returns:
- The sum of 1 + 2 + ... + limit
-