RosettaCodeData/Task/Count-in-octal/Java/count-in-octal-1.java

7 lines
179 B
Java

void printCount() {
for (int value = 0; value <= 20; value++) {
/* the 'o' specifier will print the octal integer */
System.out.printf("%o%n", value);
}
}