1
0
Fork 0
mirror of synced 2025-09-23 04:08:33 +00:00
ZoKrates/zokrates_cli/examples/comparison_operators.zok
2022-06-28 19:23:45 +02:00

9 lines
No EOL
231 B
Text

// comparison operator example
def main(field mut x) -> field {
field mut y = x >= 3 ? 1 : 5;
field mut z = y <= x ? x**3 : y**3;
y = x < 3 ? 2 : 6;
z = y > z ? 1 : 2;
x = x == x ? x : y;
return x + y + z;
}