-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathONE.java
More file actions
26 lines (22 loc) · 759 Bytes
/
ONE.java
File metadata and controls
26 lines (22 loc) · 759 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
//Imports.
import java.util.*;
//The Main Class.
class ONE{
public static void main(String[] args){
//Getting the user input.
Scanner scan = new Scanner(System.in);
System.out.print("\nPlease give me your list (separation token must be \",\"): ");
String list = scan.nextLine();
scan.close();
//Making the input from string to array.
String[] token = list.split(",");
int[] lister = new int[token.length];
int pos = 0;
for(String i : token){
lister[pos] = Integer.valueOf(i);
pos++;
}
//Executing the Algorithms.
Algo algorithms = new Algo(lister);
}
}