A program that repeatedly asks the user to enter two money

Assignment Help Civil Engineering
Reference no: EM131048620

Write a program that repeatedly asks the user to enter two money amounts expressed in old-style British currency: pounds, shillings, and pence. (See Exercises 10 and 12 in Chapter 2, "C++ Programming Basics.") The program should then add the two amounts and display the answer, again in pounds, shillings, and pence. Use a do loop that asks the user whether the program should be terminated. Typical interaction might beEnter first amount: £5.10.6Enter second amount: £3.2.6Total is £8.13.0Do you wish to continue (y/n)?To add the two amounts, you'll need to carry 1 shilling when the pence value is greater than 11, and carry 1 pound when there are more than 19 shillings.

Reference no: EM131048620

Questions Cloud

The potential adoption of flat-rate tax structure : There are a number of taxation rate structures in use in various countries in the world. For citizens residing in the United States, a progressive tax rate structure is applicable presently. Write a report comparing the advantages and disadvantages o..
Summer camp for kids with the average expenses : Pat Davis runs a summer camp for kids with the average expenses in each month as shown below. The camp uses a savings account for all funds that pays interest of 1.00% nominal annual rate with monthly compounding. Pat is getting older and wants to fu..
A relationship between gender and attending school : To estimate the average length of time spent in Barbados by long stay tourists, 150 immigration records were reviewed. The sample produced a mean stay of 8.8 days, with a standard deviation of 6 days.
Four investments-annually in mutual fund : You invest $3,000 annually in a mutual fund that earns 11 percent annually, and you reinvest all distributions. How much will you have in the account at the end of 15 years? You invest $3,000 annually in a mutual fund with a 4 percent load fee so tha..
A program that repeatedly asks the user to enter two money : To add the two amounts, you'll need to carry 1 shilling when the pence value is greater than 11, and carry 1 pound when there are more than 19 shillings.
Identify and explain the role of a specifc tourism : Identify what is actually occuring or being practised at a place, and relate this to the theoretical concepts introduced in this unit - identify and explain the role of a specifc tourism or hospitality industry in your TDR
What is your expected return on your investment : Suppose you have $10,000 in cash and you decide to borrow another $10,000 at a(n) 6% interest rate to invest in the stock market. You invest the entire $20,000 in an exchange-traded fund (ETF) with a 11% expected return and a 20% volatility. What is ..
Main issues facing this special population : What are the main issues facing this special population, particularly concerning access, quality, and cost-effective care? What are some public policies that would support the needs of this special population?
Interest rates versus the new mortgage payments : You are currently in the 9th year of a 30-year fixed rate, fully amortized mortgage with monthly payments, with the lock-in period of 10 years (prepayment penalty is 2% of the remaining balance). Assume that rate doesn’t change over the life of the l..

Reviews

Write a Review

Civil Engineering Questions & Answers

  Determine the braking efficiency of car

Two cars are traveling on level terrain at 60 mi/h on a road with a coefficient of adhesion of 0.8. The driver of car 1 has a 2.5-s perception/reaction time and the driver of car 2 has a 2.0-s perception/reaction time

  Calculating the ph of solution

A 1.50 L buffer solution is 0.250 M in HF and 0.250 M in NaF. Calculate the pH of the solution after the addition of 0.0500 moles of solid NaOH. Assume no volume change upon the addition of base. The Ka for HF is 3.5 x 10 -4 .

  Find summer values for oxygen demand and oxygen tranfer

A fine-bubble aeration basin has a flow of 21.5 mgd, an influent BOD of 180 mg/l, 31 mg/l of mmonia, and effluent of 10 mg/l. During the winter, the wastewater temperature of 14.8 degrees C does not nitrify.

  When would the wells start interfering with each other

Two pumping wells 1,000 m away fully penetrate the same confined aquifer. One of the wells pumps at a rate of 1240 m3/ day and the second well pumps at 850 m3/ day.

  Write an m-file to calculate the factorial function of n

Write an M-file to calculate the factorial function of N!, as defined by: N!=1 N=0 N!=N*(N-1)*(N-2)*...*3*2*1 N>0 The MATLAB code to calculate N factorial for positive value of N would be

  What is the total hydraulic energy at the surface of water

The bottom of a rectangular flume is 5 m above reference level. The depth of the water in the flume is 3 m. The average velocity is 1.7 m/s. What is the total hydraulic energy at the surface of the water and at the bottom of the flume.

  Determine what is the angle theta required for equilibrium

Rope segment BC creates an angle of phi2 = 74.0^\circ with the floor and rope segment CD creates an angle theta with the horizontal. If both ropes BCA and CD can support a maximum tensile force T3 = 130 lb,

  Determine the incremental rate of return between company

The General Hospital is evaluating new office equipment offered by three companies. The interest rate is 8%. Company A Company B Company C Cost $500 $600 $700 Annual benefit 130 115 100 End of useful life salvage value 0 250 180 Useful life (yrs) 5 5..

  What is the maximum flowrate in the business can discharge

A business wishes to discharge salt into a river. the concentration of salt from the business is 210 mg/L. the flow of water in the river (upstream) is 0.5 m^3/s. Upstram the concentration of salt in the river 15 mg/L.

  Create a histogram of the data set you calculated

Use the randn function to create 1000 values in a normal (Gaussian) distribution of numbers with a mean of 70 and a standard deviation of 3.5. Create a histogram of the data set you calculated.

  How much must set aside in savings account for the 3-months

Martin pays rent of $500 per month for the 9-month acedemic year, he is going to travel the world this summer and won't be working. how much must he set aside in his savings account for the 3-month summer to cover his rent for the next year

  Determine the water depth in the bridge constriction

A river upstream of a brdige corssing is 3 meters deep and has an average velocity of 3 m/s. The bridge piers cause a constriction in the width of the flow by 12%.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd