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

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.

Step by Step Solution

3.44 Rating (151 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Haskell Program convertCurrency IntegerIntegerIntege... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!