i believe %g will achieve what you're looking for.
-Lee
I like it Lee! Thanks! Something new, yet simple. I looked it up, %g uses scientific notation (%e) or %f whichever is shorter. I assume we are in fact using %f not scientific notation based on the output below, why this %f doesn't include the extra 0's, and actually using %f instead of %g does, I don't know.
Code:
printf ("The largest number you printed was: %g\n", current_maximum) ;
return 0 ;
Code:
Enter a number: 899
Enter a number: 878
Enter a number: 3
Enter a number: 2
Enter a number: 0
The largest number you printed was: 899