Hello all,
I am having trouble with a java program in which I have to use the printf method in order to allow my program to print the program in neat columns that aligns all the numbers properly.
I have written the code that prints all of the numbers, so now I just have to add in the printf's that will clean the columns up.
Here is the code that I have so far:
I have tried changing the specific the sys.o.print lines to sys.o.printf then beginning the statements with things like %d30 in hopes of setting each line to 30 characters wide but all that did was extend all of the rows to be 30 characters long.
I am having trouble with a java program in which I have to use the printf method in order to allow my program to print the program in neat columns that aligns all the numbers properly.
I have written the code that prints all of the numbers, so now I just have to add in the printf's that will clean the columns up.
Here is the code that I have so far:
I have tried changing the specific the sys.o.print lines to sys.o.printf then beginning the statements with things like %d30 in hopes of setting each line to 30 characters wide but all that did was extend all of the rows to be 30 characters long.