you are missing number in %9.f│, so it should be like
System.out.printf("║%9.2f│%9.2f│%9.2f│%9.2f║", p ,r ,n , p * (1 + r) * n);
2
solved formatted fixed length double in java
you are missing number in %9.f│, so it should be like
System.out.printf("║%9.2f│%9.2f│%9.2f│%9.2f║", p ,r ,n , p * (1 + r) * n);
2
solved formatted fixed length double in java