A-M baby
This commit is contained in:
parent
764da6cbbb
commit
db842d013d
19005 changed files with 197040 additions and 7 deletions
17
Task/Arithmetic-Integer/Factor/arithmetic-integer-1.factor
Normal file
17
Task/Arithmetic-Integer/Factor/arithmetic-integer-1.factor
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
USING: combinators io kernel math math.functions math.order
|
||||
math.parser prettyprint ;
|
||||
|
||||
"a=" "b=" [ write readln string>number ] bi@
|
||||
{
|
||||
[ + "sum: " write . ]
|
||||
[ - "difference: " write . ]
|
||||
[ * "product: " write . ]
|
||||
[ / "quotient: " write . ]
|
||||
[ /i "integer quotient: " write . ]
|
||||
[ rem "remainder: " write . ]
|
||||
[ mod "modulo: " write . ]
|
||||
[ max "maximum: " write . ]
|
||||
[ min "minimum: " write . ]
|
||||
[ gcd "gcd: " write . drop ]
|
||||
[ lcm "lcm: " write . ]
|
||||
} 2cleave
|
||||
13
Task/Arithmetic-Integer/Factor/arithmetic-integer-2.factor
Normal file
13
Task/Arithmetic-Integer/Factor/arithmetic-integer-2.factor
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
a=8
|
||||
b=12
|
||||
sum: 20
|
||||
difference: -4
|
||||
product: 96
|
||||
quotient: 2/3
|
||||
integer quotient: 0
|
||||
remainder: 8
|
||||
modulo: 8
|
||||
maximum: 12
|
||||
minimum: 8
|
||||
gcd: 4
|
||||
lcm: 24
|
||||
Loading…
Add table
Add a link
Reference in a new issue