The (double) thingy is a cast, it should be placed in front of a variable to promote that variable from int to double. So remove the asterisk, and the program works:
System.out.println("The average is: " + ((double) (o + t)/2));
Without the cast, the program would do integer calculation, essentially giving you a rounded integer result, which is not what you want.