There is a very simple thing I cannot accomplish in C. I just want to make a simple division. The result is rounding the number.
Here is the code
#include <stdio.h>
#include <math.h>
int main()
{
float a = 5 / 2;
printf("%0.2f", a);
return 0;
}
The result I'm getting is 2.00
and I want it to be the actual 2.50
.