for my result I am getting.Code:#include <stdio.h>
#include <stdlib.h>
// Example program............. copywright protected, 2003
int main()
{
float data;
data = 0.023;
printf ("e = %e\n",data);
return 0;
}
e = 2.300000e-002
I would like to get 2.3e-002
but if my data is... data = 0.023900
I want to get 2.39e-002, not 2.390000e-002
How to set the %e formatter so I don't get any trailing zeros.
Thanks.