Spaces:
Sleeping
Sleeping
Download samples/arithmetic.cl from Kacemath/cl-compiler: direct link, hf CLI and curl.
- Browser
- Download file 287 Bytes
-
https://huggingface.co/spaces/Kacemath/cl-compiler/resolve/main/samples/arithmetic.cl
- Command line
-
hf download hf://spaces/Kacemath/cl-compiler/samples/arithmetic.cl
-
curl -L -o arithmetic.cl https://huggingface.co/spaces/Kacemath/cl-compiler/resolve/main/samples/arithmetic.cl
287 Bytes
| // arithmetic.cl — Tests arithmetic expressions and operator precedence | |
| int a; | |
| int b; | |
| int c; | |
| int result; | |
| a = 10; | |
| b = 3; | |
| c = 2; | |
| // result = (a + b) * c - 1 → (10 + 3) * 2 - 1 = 25 | |
| result = (a + b) * c - 1; | |
| // Test subtraction and multiplication separately | |
| a = a - b; | |
| b = b * c; | |