style: format code (#4212)

close #4204
This commit is contained in:
acbin
2023-06-09 18:52:05 +08:00
committed by GitHub
parent ad03086f54
commit 00282efd8b
521 changed files with 5233 additions and 7309 deletions

View File

@ -16,9 +16,7 @@ public class MatrixChainMultiplication {
public static void main(String[] args) {
int count = 1;
while (true) {
String[] mSize = input(
"input size of matrix A(" + count + ") ( ex. 10 20 ) : "
);
String[] mSize = input("input size of matrix A(" + count + ") ( ex. 10 20 ) : ");
int col = Integer.parseInt(mSize[0]);
if (col == 0) {
break;
@ -30,12 +28,7 @@ public class MatrixChainMultiplication {
count++;
}
for (Matrix m : mArray) {
System.out.format(
"A(%d) = %2d x %2d%n",
m.count(),
m.col(),
m.row()
);
System.out.format("A(%d) = %2d x %2d%n", m.count(), m.col(), m.row());
}
size = mArray.size();