<<< Try this! | Index | I/O States Summary >>> |
Modify cin_unget_char.cpp sample, so that:
Add functionality to validate that entered numbers fall within the specified range of values.
Allow get_value( ) function to treat numbers enclosed in parenthesis as negative values.
For example,
(123)
should be taken as
-123
and so on.
Modify the program to process doubles instead of ints.
Add a parameter to control the precision of entered doubles.
Treat entered doubles as currency. Print the results in nicely aligned manner and add the totals at the end.
Same as above, but print all negative amounts in parenthesis. That is, -123.456789 should be displayed as
(123.46)
<<< Try this! | Index | I/O States Summary >>> |