1
0
Fork 0
mirror of synced 2025-09-23 12:18:44 +00:00
ZoKrates/zokrates_cli/examples/comparison_operators.zok
2019-09-24 12:05:43 +02:00

8 lines
261 B
Text

// comparison operator example
def main(field x) -> (field):
field y = if x >= 3 then 1 else 5 fi
field z = if y <= x then x**3 else y**3 fi
y = if x < 3 then 2 else 6 fi
z = if y > z then 1 else 2 fi
x = if x == x then x else y fi
return x + y + z