Arithmetic/Integer: Difference between revisions

HolyC
(→‎{{header|JavaScript}}: Adds additional example for NodeJS)
(HolyC)
Line 1,639:
A to the power of B = 16E-4
A to the power of B = 16E-4 </lang>
 
=={{header|HolyC}}==
<lang holyc>I64 *a, *b;
a = Str2I64(GetStr("Enter your first number: "));
b = Str2I64(GetStr("Enter your second number: "));
 
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 */
}</lang>
 
=={{header|I}}==
Anonymous user