Question: In the lecture, you worked on the toDollars function which formats a number in the form $ 1 , 2 3 4 . 2 5
In the lecture, you worked on the toDollars function which formats a number in the form $ Write a more generalized format function that works like this:
double amt ;
cout formatamount; default formatting
cout formatamount; fixed, decimals
cout formatamount; width fixed, decimals
cout formatamount; width fixed, decimals, Euro
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
