#include int round(double x) { double int, frac; frac = modf(x, int); if (frac > 0.5) return int+1; else return int; }