diff --git a/src/Main.java b/src/Main.java index 90457ba..dfce23f 100644 --- a/src/Main.java +++ b/src/Main.java @@ -1,6 +1,16 @@ public class Main { public static void main(String[] args) { - System.out.println("Hello Mike!"); + for (int i = 0; i < 20; i++) { + System.out.println(pad(i+1, 2)+") Hello " + args[0] + "!"); + } + } + + private static String pad(int number, int places) { + if(String.valueOf(number).length() < places) { + return String.format("%0"+places+"d", number); + } + + return String.valueOf(number); } }