Write a program that displays the following table:
a
a^2
a^3
1
1
1
2
4
8
3
9
27
4
16
64
Breaking it down
Breaking down the problem we need to print a number, square a number and the number to the 3rd power. Using java 8 IntStream we can create a range of numbers. Starting at 1 and ending at 4, we can format the result in the table using MessageFormat.