/** * Prints ints and floats using various formatting * @author gtowell * Created: Feb 2021 */ #include int main(void) { int i; float x; // Could have done this in a single statement int x=40; i = 40; x = 839.21f; printf("|%d|%5d|%-5d|%5.3d|\n", i, i, i, i); printf("|%10.3f|%10.3e|%-10g|\n", x, x, x); return 0; }