Details of this Paper

Write a program that will ask the user




Write a program that will ask the user how many of these coinpurses they wish to enter. Then prompt the user, for each coinpurse, the contents of that purse. The value of each coinpurse should be printed. When all coinpurses have been entered, the most valuable purse should be displayed again, and then the total value of all coinpurses.;Challenge: A truly outstanding solution would be able to read in the purses from a file and produce output, or write out the contents of all the purses to a file after they are entered, as the user of the program desired.;Sample Output;How many coinpurses? 3;Coinpurse #1;How many dollars? 1;How many quarters? 7;How many dimes? 3;How many nickels? 5;How many pennies? 2;Total value: $3.32 (1D, 7q, 3d, 5n, 2p);Coinpurse #2;How many dollars? 10;How many quarters? 4;How many dimes? 6;How many nickels? 2;How many pennies? 55;Total value: $12.25 (10D, 4q, 6d, 2n, 55p);Coinpurse #3;How many dollars? 0;How many quarters? 42;How many dimes? 87;How many nickels? 2;How many pennies? 105;Total value: $20.35 (0D, 42q, 87d, 2n, 105p);Purse #3 is the most valuable: $20.35 (0D, 42q, 87d, 2n, 105p);Total value is $35.92 (11D, 53q, 96d, 9n, 162p)


Paper#65597 | Written in 18-Jul-2015

Price : $32