MCPcopy Create free account
hub / github.com/PrajaktaSathe/Java / input

Method input

Programs/SortNonBoundary.java:8–33  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

6 Scanner sc=new Scanner(System.in);
7 int A[][],B[],m,n;
8 void input()
9 {
10 Scanner sc = new Scanner(System.in);
11 System.out.print("Enter the size of the square matrix : ");
12 m=sc.nextInt();
13 if(m<4 || m>10)
14 {
15 System.out.println("Invalid Range");
16 System.exit(0);
17 }
18 else
19 {
20 A = new int[m][m];
21 n = (m-2)*(m-2);
22 B = new int[n];
23 System.out.println("Enter the elements of the Matrix : ");
24 for(int i=0;i<m;i++)
25 {
26 System.out.print("Enter a value : ");
27 for(int j=0;j<m;j++)
28 {
29 A[i][j]=sc.nextInt();
30 }
31 }
32 }
33 }
34 void convert(int s)
35 {
36 int x=0;

Callers 1

mainMethod · 0.95

Calls 1

printMethod · 0.80

Tested by

no test coverage detected