Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- boolean done = false;
- while(!done)
- {
- System.put.println(“Enter value, Q to quit”);
- String input = in.next();
- if(input.equalsIgnoreCase(“Q”))
- done = true;
- else
- {
- double x = Double.parseDouble(input); //Converts the string to number
- data.add(x);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement