Question: please C++ programming 1. Before the 1950's, Great Britain used a monetary system based on pounds, shillings, and pence. There were 20 shillings to a

please C++ programming please C++ programming 1. Before the 1950's, Great Britain used a monetary

1. Before the 1950's, Great Britain used a monetary system based on pounds, shillings, and pence. There were 20 shillings to a pound, and 12 pence to a shilling. The notation for this old system used the pound sign, E, and two decimal points, so that, for example, 5.2.8 meant 5 pounds, 2 shillings, and 8 pence. We'll call this system old-pounds. The new monetary system, introduced in the 1950's, consists of only pounds and pence, with 100 pence to a pound (like U.S. dollars and cents). We'll call this system decimal-pounds. So, 5.2.8 in the old-pounds is 5.13 in decimal-pounds. Write a program that asks the user to enter two money amounts expressed in old-pounds and will then add the two amounts and display the answer both in old-pounds and in decimal-pounds. Program requirements: a) Read the numbers into integer variables and then make use of the integer division and remainder (%) operators to do the needed arithmetic for both calculations of the old-pounds sum as well as the decimal-pounds equivalent. b) To read in the old-pound amounts, make use of the fact that the extraction operator>>) can be chained to read in more than one quantity at once. For example: cin >> pound >> doti >> shill >> dot2 >> pence; will read an old-pound amount into integer variables pound, shill, and pence, and read the "dots" into the character variables doti and dot2. Here is an example of a user's interaction with the program: Enter first old-pound amount: 5.10.11 Enter second old-pound amount: 3.19.5 old-pound total = 9.10.4 Decimal-pound total = 9.51

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!