60 477
Assignments Done
Successfully Done
In April 2018

Answer to Question #30685 in C++ for Mike

Question #30685
Secondhand Rose Resale Shop is having a seven-day sale during which the price of any unsold item drops 10 percent each day. For example, an item that costs $10.00 on the first day costs 10 percent less, or 9.00, on the second day. On the third day, the same item is 10 percent less than $9.00, or $8.10. Design an application that allows a user to input a price until an appropriate sentinel value is entered. Output is the price of each item on each day, one through seven.
Expert's answer
#include <iostream>
#include <memory.h>
#include <stdio.h>
#include <cstdlib>
#include <algorithm>

using namespace std;

int main()
double price;
for (;;) {
& cin >> price;
& if (price < 0) break;
& for (int i = 0; i < 7; i++) {
price *= 0.9;
cout << price << " ";
& }
& cout << endl;
return 0;

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!


No comments. Be first!

Leave a comment

Ask Your question

Privacy policy Terms and Conditions