0

Hey, can anybody help me making a program hay asks for 50 values and sabe them. With tan condition fue numbers cant be repeated

13th Sep 2017, 1:09 AM
Emi Schol
Emi Schol - avatar
3 ответов
+ 7
So, you want to take input but can't use a scanner? You can try to use a BufferedReader and InputStreamReader. Example/ import java.io.BufferedReader; import java.io.InputStreamReader; // The required imports BufferedReader sc = new BufferedReader(new InputStreamReader(System.in)); String input = sc.readLine(); // getting input It is similar to a Scanner, but not quite the same.
13th Sep 2017, 2:46 AM
Rrestoring faith
Rrestoring faith - avatar
+ 5
The question started strong, but quickly turned to gibberish. 😶 Easiest way to store 50 variables is to use an array. Then, all you really need to do is use a loop to ask for input, and add it to the array. If you want, instead of an array you can use a set. A set will remove all the duplicate values for you Set<Integer> set = new HashSet<Integer>();
13th Sep 2017, 2:36 AM
Rrestoring faith
Rrestoring faith - avatar
0
Thanks for your reply but told them that while we could make it and another question I can not use the scanner program by which I have not enabled its can help me how to do it thanks
13th Sep 2017, 2:41 AM
Emi Schol
Emi Schol - avatar