Make eval handle "3+5": character 0 is the left digit, character 1 is the +, character 2 is the right digit. Add them.
check("3+5", 8);
fn eval(input: []const u8) i64 {
const a: i64 = @as(i64, input[0] - '0');
const b: i64 = @as(i64, input[2] - '0');
return a + b;
}
We're ignoring the operator. Hardcoded addition. Let's fix that.