Assume that type Money, a structured type with two int fields, dollars and cents, has been declared . Write the definition of a function named normalize that receives a Money argument and returns a Money value. What it returns is the “normalized” equivalent of the argument, that is, a value that is equivalent but where cents is a number between 0 and 99 inclusive. So if a Money value of 5 dollars and 325 cents was passed, a Money value of 8 dollars and 25 cents would be returned.

Assume that type Money, a structured type with two int fields, dollars and cents, has been declared . Write the definition of a function named normalize that receives a Money argument and returns a Money value. What it returns is the “normalized” equivalent of the argument, that is, a value that is equivalent but where cents is a number between 0 and 99 inclusive. So if a Money value of 5 dollars and 325 cents was passed, a Money value of 8 dollars and 25 cents would be returned.

LANGUAGE: C++

CHALLENGE:

Assume that type Money, a structured type with two int fields, dollars and cents, has been declared . Write the definition of a function named normalize that receives a Money argument and returns a Money value. What it returns is the “normalized” equivalent of the argument, that is, a value that is equivalent but where cents is a number between 0 and 99 inclusive. So if a Money value of 5 dollars and 325 cents was passed, a Money value of 8 dollars and 25 cents would be returned.

This content requires that you purchase additional access. The price is $2.99 or free for our Make Life Easier and 30 Days – Not Recurring members.

Purchase this Content ($2.99) Choose a Membership Level