Add tasks for all the new languages
This commit is contained in:
parent
9dc3c2bb62
commit
bba7bfd280
13208 changed files with 134745 additions and 0 deletions
9
Task/Arithmetic-Integer/Phix/arithmetic-integer.phix
Normal file
9
Task/Arithmetic-Integer/Phix/arithmetic-integer.phix
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
integer a = floor(prompt_number("a = ",{}))
|
||||
integer b = floor(prompt_number("b = ",{}))
|
||||
|
||||
printf(1,"a + b = %d\n", a+b)
|
||||
printf(1,"a - b = %d\n", a-b)
|
||||
printf(1,"a * b = %d\n", a*b)
|
||||
printf(1,"a / b = %g\n", a/b) -- does not truncate
|
||||
printf(1,"remainder(a,b) = %d\n", remainder(a,b)) -- same sign as first operand
|
||||
printf(1,"power(a,b) = %g\n", power(a,b))
|
||||
Loading…
Add table
Add a link
Reference in a new issue