mirror of
https://github.com/TheAlgorithms/Java.git
synced 2025-07-23 12:35:55 +08:00
Format code with prettier (#3375)
This commit is contained in:
@ -16,7 +16,9 @@ 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;
|
||||
@ -28,7 +30,12 @@ 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();
|
||||
|
Reference in New Issue
Block a user