I'm working on an assignment, and I'm having trouble understanding when to use double or integers. Here are the variable definitions:
int a = 5;
int b = 12;
double x = 3.4;
double z = 9.1;
Now I'm not going to ask you to do my homework but this is the example I'm stuck with. What would be the difference between "static_cast<double>(b / a)" and "static_cast<double>(b) / a"
Aren't they both expressed in decimal? Which would make 2.4 be the answer to both.