nとUをintにしておきたいなら

printf("%f だ。",( (float) n / (float) U ));
のようにキャストする。

まあとにかく、int / int の結果は int (小数点切捨て)っていう事です