Notice that theses two equations (both are the same) one has 3 whole numbers and the second has a decimal/Double with whole numbers (just adding a .0 to 22 i guess makes it a double/Decimal ) . The compiler assumes if you use all integers your output will be an integer but if you use a double/Decimal even one the compiler will assume you want a double/Decimal as an output. right?