zettacode.files/arithmetic.integer/holyc.txt in zettacode-0.1.0 vs zettacode.files/arithmetic.integer/holyc.txt in zettacode-0.1.1

- old
+ new

@@ -1,14 +1,14 @@ -I64 *, *b - = S2I64(GS("E u f ub: ")) -b = S2I64(GS("E u c ub: ")) +I64 *a, *b; +a = Str2I64(GetStr("Enter your first number: ")); +b = Str2I64(GetStr("Enter your second number: ")); -f (b == 0) - P("E: T c ub u b z.\") - { - P(" + b = %\", + b) - P(" - b = %\", - b) - P(" * b = %\", * b) - P(" b = %\", b) * u * - P(" % b = %\", % b) * f * - P(" ` b = %\", ` b) +if (b == 0) + Print("Error: The second number must not be zero.\n"); +else { + Print("a + b = %d\n", a + b); + Print("a - b = %d\n", a - b); + Print("a * b = %d\n", a * b); + Print("a / b = %d\n", a / b); /* rounds down */ + Print("a % b = %d\n", a % b); /* same sign as first operand */ + Print("a ` b = %d\n", a ` b); }