Hey, Im having a bit of a problem printing this data.
I am trying to divide two integers and print out a float.
For example:
I want to get:Code:sum = 521; printf(" a = %.1f\n", (float)(sum/2)); printf(" b = %.2f\n", (float)(sum/100));
a = 260.5
b = 5.21%
but instead I get:
a = 260.0
b = 5.00
Also , how do i get that percentage sign in there after the number?
thanks alot.