projects
/
cacao.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
fixed builtin problem on alpha
[cacao.git]
/
tests
/
sum.java
1
2
// Zahlen summieren, Java Version
3
4
public class sum {
5
6
7
static public void main(String [] arg) {
8
9
int s = 0, i = 0;
10
int inc = 1;
11
int n = Integer.parseInt (arg[0]);
12
13
14
for (i=0; i<n; i+=inc) s+=inc;
15
16
System.out.print (".... done, sum: ");
17
System.out.println (s);
18
}
19
20
21
}
22