omega-mv
Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance.
Brought by drakestapleton
omega-mv / tests / universal / arithmetic.c
| 1 | /* Independent C17 development oracle. Not an Omega runtime. */ |
| 2 | #include <stdint.h> |
| 3 | #include <stdio.h> |
| 4 | #include <inttypes.h> |
| 5 | int main(void) { |
| 6 | uint64_t a, b; |
| 7 | while (scanf("%" SCNu64 " %" SCNu64, &a, &b) == 2) { |
| 8 | if (!b) return 2; |
| 9 | printf("%" PRIu64 " %" PRIu64 " %" PRIu64 " %" PRIu64 "\n", a + b, a - b, a * b, a / b); |
| 10 | } |
| 11 | return ferror(stdin) ? 3 : 0; |
| 12 | } |