Ulam numbers: Difference between revisions

m
Minor edit to Java code
m (→‎{{header|REXX}}: added/changed whitespace and comments.)
m (Minor edit to Java code)
Line 468:
long start = System.currentTimeMillis();
for (int n = 1; n <= 100000; n *= 10) {
System.out.println(String.formatprintf("Ulam(%d) = %d\n", n, ulam(n)));
}
long finish = System.currentTimeMillis();
System.out.println(String.formatprintf("Elapsed time: %.3f seconds\n", (finish - start)/1000.0));
}
 
1,777

edits