import java.util.*; //Delete this line for OWL public class StringSearch { public static void main(String args[]) { Scanner scan = new Scanner(System.in); String input = scan.nextLine(); //read a String from the keyboard int count = 0; //the number of B's or b's boolean hasEven = false; //does the String have an even digit? boolean hasOdd = false; //does the String have an odd digit? for(int i = 0; i < input.length(); i++) { // loop through the chars in the input String char c = input.charAt(i); if(Character.isDigit(c)) { //is the current char a digit? (0-9) int numValue = Character.getNumericValue(c); //get the digit's value as an int if(numValue % 2 == 0) //is the digit even? hasEven = true; else hasOdd = true; } else { //the current char is not a digit if((c == 'b') || (c == 'B')) //so let's see if it's a b or B count++; //count = count + 1 } } //end of for loop if(hasEven) System.out.println("There is an even digit."); else System.out.println("There are no even digits."); if(hasOdd) System.out.println("There is an odd digit."); else System.out.println("There are no odd digits."); System.out.println("The number of letter Bees is " + count); } }