MCPcopy Create free account
hub / github.com/codemistic/Data-Structures-and-Algorithms / takingInput

Method takingInput

Java/Array/ArraySum.java:47–55  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

45 }
46
47 public static int[] takingInput() {
48 Scanner sc = new Scanner(System.in);
49 int n = sc.nextInt();
50 int[] arr = new int[n];
51 for (int i = 0; i < n; i++) {
52 arr[i] = sc.nextInt();
53 }
54 return arr;
55 }
56
57 public static void main(String[] args) {
58 int[] arr = takingInput();

Callers 1

mainMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected