1
Guys, I have a question. It is possible in C to print only the different values of 0.
A Case:
We have the exits: 2.56000, 5.00000, 3.60000 and 27.36800
And I want you to print as follows: 2.56, 5, 3.6 and 27.368
But with the print running in a loop where I can only put
printf("%.2f \n");
or
printf("%f \n");
or
printf("%.1f \n");
or
printf("%.3f \n");
Can someone help me?
You know that floating dots are about scientific data, right? And you know that 1.0 has an implicit accuracy of 5%, while 1.00000 has accuracy in the order of 5E-6, right?
– Jefferson Quesado