the last row is the error and my exercise from the book says i have to do it this way instead of initializing the varible a doublepublic class Ex21{ public static void main(String args[]){ int num1, num2, num3, total1, total2; num1 = Keyboard.readInt(); num2 = Keyboard.readInt(); num3 = Keyboard.readInt(); total1 = num1+num2+num3; total2 = (double)total1/3; } }
anyone know how to solve this?
thank you