diff --git a/examples/operator_precedence/operator_precedence.mc b/examples/operator_precedence/operator_precedence.mc new file mode 100644 index 0000000..8c3a182 --- /dev/null +++ b/examples/operator_precedence/operator_precedence.mc @@ -0,0 +1,14 @@ +int main() +{ + int x; + x = 4 + 3 * 5 + 6; + print_int(x); + print_nl(); + + int y; + y = 4 * 3 + 5 * 6; + print_int(y); + print_nl(); + + return 0; +} diff --git a/examples/operator_precedence/operator_precedence.stdin.txt b/examples/operator_precedence/operator_precedence.stdin.txt new file mode 100644 index 0000000..e69de29 diff --git a/examples/operator_precedence/operator_precedence.stdout.txt b/examples/operator_precedence/operator_precedence.stdout.txt new file mode 100644 index 0000000..432bba8 --- /dev/null +++ b/examples/operator_precedence/operator_precedence.stdout.txt @@ -0,0 +1,2 @@ +25 +42