Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- System.out.print("enter base ");
- base = scanner.nextInt();
- maxLength = (int)(Math.pow(base, 7));
- String len = "" + maxLength;
- maxLength = len.length();
- for (int i=1; i<=7;i++)
- { result = (int)Math.pow(base,i);
- String aktuelleLen = "" + result;
- aktuelleLaenge = aktuelleLen.length();
- for(int j=0; j<= (maxLength - aktuelleLaenge);j++)
- { System.out.print(" ");
- }
- System.out.println("\t" + result);
- }
Add Comment
Please, Sign In to add comment