2024-11-11 23:50:38 +02:00
|
|
|
#include <assert.h>
|
2024-11-13 15:58:29 +02:00
|
|
|
#include <stdio.h>
|
|
|
|
#include <math.h>
|
2024-11-12 17:07:06 +02:00
|
|
|
|
|
|
|
int main(int argc, const char **argv) {
|
2024-11-13 15:58:29 +02:00
|
|
|
double x = round(1234.123);
|
|
|
|
assert(fabs(x - 1234.000) < 0.00001);
|
|
|
|
double y = round(1234.5678);
|
|
|
|
assert(fabs(y - 1235.000) < 0.00001);
|
2024-11-11 15:19:36 +02:00
|
|
|
return 0;
|
|
|
|
}
|