anekos #618(2007/07/12 08:26 GMT) [ Haskell ] Rating0/0=0.00
1 2 3 4 5 6 7 8 9 10
import Char includeTax s = inText s where inText [] = [] inText (x:xs) | isDigit x = inPrice xs [x] | otherwise = x : inText xs inPrice (x:xs) y | isDigit x = inPrice xs (y ++ [x]) inPrice xs y = tax y ++ inText xs tax s = show $ floor $ 1.05 * read s main = getContents >>= (putStr . includeTax)
Rating0/0=0.00-0+
[ reply ]
anekos
#618()
[
Haskell
]
Rating0/0=0.00
Rating0/0=0.00-0+
[ reply ]