#include <stdio.h>
int main(void) {
float n1 = 4;
float n2 = 9;
float total = n2 / n1 ;
float truncado
= floor( total
* 10.0f ) / 10.0f;
printf("Media: %.1f\n", truncado
); printf("Media: %.2f\n", truncado
); printf("Media: %.5f\n", truncado
); return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CgppbnQgbWFpbih2b2lkKSB7CglmbG9hdCBuMSA9IDQ7CglmbG9hdCBuMiA9IDk7CgkKCWZsb2F0IHRvdGFsID0gbjIgLyBuMSA7CglmbG9hdCB0cnVuY2FkbyA9IGZsb29yKCB0b3RhbCAqIDEwLjBmICkgLyAxMC4wZjsKCQoJcHJpbnRmKCJNZWRpYTogJS4xZlxuIiwgdHJ1bmNhZG8gKTsKCXByaW50ZigiTWVkaWE6ICUuMmZcbiIsIHRydW5jYWRvICk7CglwcmludGYoIk1lZGlhOiAlLjVmXG4iLCB0cnVuY2FkbyApOwoJcmV0dXJuIDA7Cn0K