Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created August 6, 2019 06:00
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/b1ff60832fd5a12ddf10e4abf6c0ed57 to your computer and use it in GitHub Desktop.
Save parzibyte/b1ff60832fd5a12ddf10e4abf6c0ed57 to your computer and use it in GitHub Desktop.
/*
Redondear números hacia arriba en C con ceil
@author parzibyte
parzibyte.me/blog
*/
#include<stdio.h>
#include<math.h>
int main(){
printf("0.5 redondeado con ceil es: %0.2f\n", ceil(0.5));
printf("50.99 redondeado con ceil es: %0.2f\n", ceil(50.99));
printf("20.24 redondeado con ceil es: %0.2f\n", ceil(20.24));
printf("0.1 redondeado con ceil es: %0.2f\n", ceil(0.1));
printf("10.5 redondeado con ceil es: %0.2f\n", ceil(10.5));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment