12 lines
263 B
C
12 lines
263 B
C
#include <assert.h>
|
|
#include <stdio.h>
|
|
#include <math.h>
|
|
|
|
int main(int argc, const char **argv) {
|
|
double x = round(1234.123);
|
|
assert(fabs(x - 1234.000) < 0.00001);
|
|
double y = round(1234.5678);
|
|
assert(fabs(y - 1235.000) < 0.00001);
|
|
return 0;
|
|
}
|