(r*2) will be an int and not a float as r is int and 2 is int. Use %d instead
%c char Character
%d int Signed decimal integer.
%e, %E float Real number, scientific notation (lowercase or uppercase exponent marker)
%f float Real number, standard notation.