RosettaCodeData/Task/Currency/Bracmat/currency.bracmat
2023-07-01 13:44:08 -04:00

22 lines
455 B
Text

div$((4000000000000000*550+2*286)+1/2,1):?before-tax
& div$(!before-tax*765/10000+1/2,1):?tax
& !before-tax+!tax:?after-tax
& ( fix
= cents dollars
. mod$(!arg.100):?cents
& ( !cents:<10&0 !cents:?cents
|
)
& div$(!arg.100):?dollars
& str$(!dollars "." !cents)
)
& str
$ ( "before-tax "
fix$!before-tax
"\ntax "
fix$!tax
\n
"after-tax "
fix$!after-tax
\n
)