%d is the output input format as integer type, used for int, short int
%f is the output input format as single precision floating point type, used for float
Double variables should use %lf, l means long.