C
Chad
I would like to remove the decimal but still show the cents using
sprintf.
char empheader[72];
double totalwage = 123.45;
sprintf(empheader, "%.2f", totalwage);
This formats totalwage to show 123.45, I want it to show 12345. I'm
creating an electronic file for wage reporting and the decimal value is
assumed so the dot shouldn't be displayed. Can this be done with
sprintf?
sprintf.
char empheader[72];
double totalwage = 123.45;
sprintf(empheader, "%.2f", totalwage);
This formats totalwage to show 123.45, I want it to show 12345. I'm
creating an electronic file for wage reporting and the decimal value is
assumed so the dot shouldn't be displayed. Can this be done with
sprintf?