write the answer on Haskell Notation The US currency is the dollar. 1 dollar = 100 cents.
Fantastic news! We've Found the answer you've been seeking!
Question:
write the answer on Haskell Notation
The US currency is the dollar. 1 dollar = 100 cents. In US currency, there are several types of coins, each of which is given a name, namely quarter (1 quarter = 25 cents = 0.25 dollars), dime (1 dime = 10 cents = 0.1 dollars), nickel (1 nickel = 5 cents = 0.05 dollars), and penny (1 penny = 1 cent = 0.01 dollars).Create a function in Haskell that accepts as input a number of quarter, dime, nickel, and penny coins and returns how many dollars and how many cents are worth the total of those coins.Example: 8 quarters, 20 dimes, 30 nickels, and 77 pennies are the same as 6 dollars and 27 cents.Note that the resulting output is a value pair.
Related Book For
Auditing a business risk appraoch
ISBN: 978-0324375589
6th Edition
Authors: larry e. rittenberg, bradley j. schwieger, karla m. johnston
Posted Date: