When I run the program, the factorial value right-aligns. Is there a way to make it left-justified while maintaining the 50 spaces in between?
public class Exerc
According to the printf() specification the - symbol left-justifies output.
printf()
-
System.out.printf("%-50.0f\n",(double)factorial);
source: http://docs.oracle.com/javase/7/docs/api/java/util/Formatter.html#syntax