Assume you have a variable price1 of type Money where the latter is a structured type with two int fields, dollars and cents. Assign values to the fields of price1 so that it represents $29.95.
LANGUAGE: C++
CHALLENGE:
Assume you have a variable price1 of type Money where the latter is a structured type with two int fields, dollars and cents. Assign values to the fields of price1 so that it represents $29.95.
SOLUTION:
price1.dollars=29; price1.cents=95;