public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while(scanner.hasNext()) {
            String label = scanner.next();                      //first value entered is label
            if(scanner.hasNextInt()) {                          //check if next input is integer
                int length = scanner.nextInt();
                if(length > MAX_BAR_LENGTH || length < 0) {     //check if input is within range
                    System.out.println("INPUT ERROR");
                    return;
                }
                System.out.println(drawBar(label, length));
            }

            else if(scanner.hasNextDouble()) {                   //check if input is a double
                double scale = scanner.nextDouble();
                if(scale > MAX_BAR_SCALE || scale < 0) {        //check if input is within range
                    System.out.println("INPUT ERROR");
                    return;
                }
                System.out.println(drawBar(label, scale));
            }
            else {                                              //if input is neither int nor double, exit program
                System.out.println("INPUT ERROR");
                return;
            }

        }
    }