modified: Java/Lab 2/Lab_2.java
This commit is contained in:
parent
8013099c36
commit
acc2d533cb
|
@ -46,17 +46,20 @@ public class Lab_2 {
|
||||||
|
|
||||||
Scanner input = new Scanner(System.in);
|
Scanner input = new Scanner(System.in);
|
||||||
|
|
||||||
a = protectedInput("Input a constant to multipy a matrix by: ", "A constant must be a short-data type integer, try again.", input);
|
a = protectedInput("Input a constant to multipy a matrix by: ",
|
||||||
|
"A constant must be a short-data type integer, try again.", input);
|
||||||
|
|
||||||
System.out.println();
|
System.out.println();
|
||||||
System.out.println("Input size of the matrix.");
|
System.out.println("Input size of the matrix.");
|
||||||
|
|
||||||
do {
|
do {
|
||||||
rows = protectedInput("Rows: ", "A number of rows must be a short-data type integer, try again.", input);
|
rows = protectedInput("Rows: ",
|
||||||
|
"A number of rows must be a short-data type integer, try again.", input);
|
||||||
} while (rows <= 0);
|
} while (rows <= 0);
|
||||||
|
|
||||||
do {
|
do {
|
||||||
columns = protectedInput("Columns: ", "A number of columns must be a short-data type integer, try again.", input);
|
columns = protectedInput("Columns: ",
|
||||||
|
"A number of columns must be a short-data type integer, try again.", input);
|
||||||
} while (columns <= 0);
|
} while (columns <= 0);
|
||||||
|
|
||||||
input.close();
|
input.close();
|
||||||
|
|
Loading…
Reference in New Issue