Because integer math was used, not floating point.
You wrote ((3/8)*100) but none of the constants in that expression have a non-integral type. Therefore the compiler (correctly) interpreted that as integer arithmetic. Since 3/8 is less than 1, the expression evaluates to 0.
A simple fix would be to write ((3./8.)*100.) instead. Actually, making either of the 3 or 8 be a floating point value would be sufficient due to the rules for mixed type expressions.