MCPcopy Index your code
hub / github.com/apache/groovy / main

Method main

benchmark/bench/pidigits.java:12–30  ·  view source on GitHub ↗
(String args[])

Source from the content-addressed store, hash-verified

10 static final int L = 10;
11
12 public static void main(String args[]) {
13 int n = Integer.parseInt(args[0]);
14 int j = 0;
15
16 PiDigitSpigot digits = new PiDigitSpigot();
17
18 while (n > 0){
19 if (n >= L){
20 for (int i=0; i<L; i++) System.out.print( digits.next() );
21 j += L;
22 } else {
23 for (int i=0; i<n; i++) System.out.print( digits.next() );
24 for (int i=n; i<L; i++) System.out.print(" ");
25 j += n;
26 }
27 System.out.print("\t:"); System.out.println(j);
28 n -= L;
29 }
30 }
31}
32
33

Callers

nothing calls this directly

Calls 4

nextMethod · 0.95
parseIntMethod · 0.80
printMethod · 0.45
printlnMethod · 0.45

Tested by

no test coverage detected