interplane.Get Omega
Read in your language

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

branch main Branches Tags History

omega-mv / tests / universal / arithmetic.c

12 lines · 383 bytes Raw Blame History
1/* Independent C17 development oracle. Not an Omega runtime. */
2#include <stdint.h>
3#include <stdio.h>
4#include <inttypes.h>
5int 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}