source:
CIVL/mods/dev.civl.com/examples/library/math/ceil.c@
cb4d4f4
| Last change on this file since cb4d4f4 was aad342c, checked in by , 3 years ago | |
|---|---|
|
|
| File size: 186 bytes | |
| Line | |
|---|---|
| 1 | #include <math.h> |
| 2 | #include <assert.h> |
| 3 | |
| 4 | int main() { |
| 5 | double pi = 3.14; |
| 6 | float pif = 3.14f; |
| 7 | double f = ceil(pi); |
| 8 | |
| 9 | assert(f == 4); |
| 10 | |
| 11 | f = ceilf(pif); |
| 12 | assert(f == 4); |
| 13 | return 0; |
| 14 | } |
Note:
See TracBrowser
for help on using the repository browser.
