Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created August 6, 2019 05:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/0db56c77edbe9aad452d8f32db5811bf to your computer and use it in GitHub Desktop.
Save parzibyte/0db56c77edbe9aad452d8f32db5811bf to your computer and use it in GitHub Desktop.
/*
Redondear números hacia abajo en C con floor
@author parzibyte
parzibyte.me/blog
*/
#include<stdio.h>
#include<math.h>
int main(){
printf("0.5 redondeado con floor es: %0.2f\n", floor(0.5));
printf("50.99 redondeado con floor es: %0.2f\n", floor(50.99));
printf("20.24 redondeado con floor es: %0.2f\n", floor(20.24));
printf("0.1 redondeado con floor es: %0.2f\n", floor(0.1));
printf("10.5 redondeado con floor es: %0.2f\n", floor(10.5));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment