Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
14
Task/Arithmetic-Integer/HolyC/arithmetic-integer.holyc
Normal file
14
Task/Arithmetic-Integer/HolyC/arithmetic-integer.holyc
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
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 */
|
||||
Print("a ` b = %d\n", a ` b);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue