Assume that all variables are defined as type double.
v = a * a * a;
v = pow(a, 3);
v = h * l * w;
v = 4.0 / 3.0 * M_PI * r * r * r;
v = 4 * M_PI * r * r * r / 3;
v = 4 * M_PI * pow(r, 3) / 3;
v = a * h / 3;
v = 1.0 / 3.0 * a * h;