June 2018 Update
This commit is contained in:
parent
ba8067c3b7
commit
22f33d4004
5278 changed files with 84726 additions and 14379 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