Purchase Solution

The Last Stop Boutique is having a five-day sale.

Not what you're looking for?

Ask Custom Question

The Last Stop Boutique is having a five-day sale. Each day, starting on Monday, the price will drop 10% of the previous day's price. For example, if the original price of a product is $20.00, the sale price on Monday would be $18.00 (10% less than the original price). On Tuesday the sale price would be $16.0 (10% less than Monday). On Wednesday the sale price would be $14.58; on Thursday the sale price would be $13.12; and on Friday the sale price would be $11.81. Develop a C++ solution that will calculate the price of an item for each of the five days, given the original price. Test the solution for an item costing $10.00.

Purchase this Solution

Solution Summary

It is a fairly simple to understand program with brief comments. Solution gives two sample sessions with different costs of the item - 10$ and 20$.

Solution Preview

Please have a look at the attached file, if things do not appear properly here. It is a plain text file, just that ".cpp" file extension is used to indicate that it is C++ code.

Note that if we do not increment the value of counter (used to count days) in the while-loop, loop condition will not change and as a result this while-loop will continue to run forever.

#include < iostream ...

Purchase this Solution


Free BrainMass Quizzes
Word 2010: Tables

Have you never worked with Tables in Word 2010? Maybe it has been a while since you have used a Table in Word and you need to brush up on your skills. Several keywords and popular options are discussed as you go through this quiz.

Basic Computer Terms

We use many basic terms like bit, pixel in our usual conversations about computers. Are we aware of what these mean? This little quiz is an attempt towards discovering that.

Javscript Basics

Quiz on basics of javascript programming language.

Word 2010: Table of Contents

Ever wondered where a Table of Contents in a Word document comes from? Maybe you need a refresher on the topic? This quiz will remind you of the keywords and options used when working with a T.O.C. in Word 2010.

Java loops

This quiz checks your knowledge of for and while loops in Java. For and while loops are essential building blocks for all Java programs. Having a solid understanding of these constructs is critical for success in programming Java.