You are performing integer division before the multiply, so 6 / 100 == 0. Use this:
float taxedvalue = (6.0f / 100.0f) * cartTotal;
Note: this will also work:
float taxedvalue = cartTotal * 6 / 100;
because the compiler recognizes the first parameter as a float and automatically treats the two integer values as floats when it multiplies and divides.