Created
August 6, 2019 05:58
-
-
Save parzibyte/72951f997d65faf10df230c924969eab to your computer and use it in GitHub Desktop.
Redondear números en C - https://parzibyte.me/blog/2018/11/08/redondear-numeros-en-c/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Redondear números en C con round | |
@author parzibyte | |
parzibyte.me/blog | |
*/ | |
#include<stdio.h> | |
#include<math.h> | |
int main(){ | |
printf("0.5 redondeado con round es: %0.2f\n", round(0.5)); | |
printf("50.48 redondeado con round es: %0.2f\n", round(50.48)); | |
printf("20.24 redondeado con round es: %0.2f\n", round(20.24)); | |
printf("9.7 redondeado con round es: %0.2f\n", round(9.7)); | |
printf("10.5 redondeado con round es: %0.2f\n", round(10.5)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment