Site icon Bytefreaks.net

C/C++: How to round up a number

Advertisements

#include 
intergerVariable = ceil (floatVariable);

To compile with math.h library you MUST include the -lm flag.

gcc -lm main.c

This post is also available in: Greek

Exit mobile version