#include <stdio.h>
int main( void)
{
double x = 1.2;
double y;
y = x*x;
printf( "in = %g, out = %g\n", x, y);
return 0;
}
in = 1.2, out = 1.44
char %c int %i %6i (width = 6) double %e %f %g %5.2f (width = 5, with 2 decimal places)
References: Linux, Open Group, C Standard