public class Summe
extends java.lang.Object
Constructor and Description |
---|
Summe() |
Modifier and Type | Method and Description |
---|---|
long |
gauss(long n)
Gauss-Formel, berechnet Summe von 0 bis n.
|
static void |
main(java.lang.String[] args)
Startet das Programm,
erzeugt Summe bis zu einer eingelesenen Zahl.
|
long |
summe(long n)
Berechnen der Summe von 0 bis n.
|
public long summe(long n)
n
- letzter Summandpublic long gauss(long n)
n
- letzter Summandpublic static void main(java.lang.String[] args)