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 / research / om-bench / controls / fibo-main.om
| 1 | fn main to int |
| 2 | n = readall |
| 3 | v = ulong 0 |
| 4 | for i ulong n |
| 5 | c = get inb i |
| 6 | if and ge c 48 le c 57 |
| 7 | v = add mul v 10 ulong sub c 48 |
| 8 | end |
| 9 | end |
| 10 | a = ulong 0 |
| 11 | b = ulong 1 |
| 12 | for i ulong v |
| 13 | t = add a b |
| 14 | a = b |
| 15 | b = t |
| 16 | end |
| 17 | printu a |
| 18 | ret 0 |
| 19 | end |