0
C question : Why here i need to put parentheses
float index = 0.0588 * (100 * (float)y / (float)x) - 0.296 * (100 * (float)z / (float)x) - 15.8; Why i need to put parentheses around float
2 Answers
+ 2
y, x and z were converted to float. The use of parentheses are part of the conversion syntax.
https://www.tutorialspoint.com/cprogramming/c_type_casting.htm
+ 2
() called cast operator
https://www.ibm.com/docs/en/zos/2.1.0?topic=expressions-cast-operator