Y Shaikh wrote:Hi! How do I round to two decimal places in my answer? I tried using %02d but it doesn't seem to work.
Please note that the marker (%d) stands in for a
digit (integer), not a
decimal. You're probably looking for a "float" (%f), which is used for all floating-point numbers, like double.
You will still need to lookup have to format the numbers to the right of the decimal point.