Question

In: Computer Science

Ann is planning to purchase some items. The store is having a sale, where if you...

  1. Ann is planning to purchase some items. The store is having a sale, where if you buy one item the 2nd item (of equal or lower value) is 50% off. The tax on each item is 7%.                                                                                                                    
  • Item 1 costs $39.75 before taxes.
  • Item 2 costs $65.50 before taxes.
    1. If Ann only buys Item 2, what is the total cost of her purchase after taxes? Display this value (rounded to the nearest cent) with a suitable message.
    2. If Ann buys Item 1 and Item 2, what is the total cost after taxes? Display this value (rounded to the nearest cent) with a suitable message.
    3. If Ann buys Item 1 and Item 2, how much money does Ann save before taxes, due to the sale? Display this value (rounded to the nearest cent) with a suitable message.

Solutions

Expert Solution

Answer: Hi! Kindly find your solution here. You didn't mention any language for a program that's why I used C++ language. If you have any queries, feel free to ask me. Thanks.

#include<iostream>
#include<iomanip>
using namespace std;

int main()
{
   int item;
   double tax,cost,total,save;
   cout<<"There are two items in sale:"<<endl;
   cout<<"Item 1"<<endl;
   cout<<"Item 2"<<endl;
   cout<<"Which item do you want to buy? enter 1 for Item 1 and 2 for Item,3 for both 2"<<endl;
   cin>>item;
  
   if(item==2)
   {
       cost=item*65.50;
       tax=cost*7/100;
       cost=cost+tax;
       cout<<"Total cost is: $ "<<fixed<<setprecision(2)<<cost;
   }
else
       if(item==3)
       {
           cost=39.75+65.50;
           tax=cost*7/100;
           cost=cost/2;
           save=cost;
           cost=cost+tax;
       cout<<endl<<"Total cost is:$'<<fixed<<setprecision(2)<<cost;
       cout<<endl<<"He saved :$ "<<save;
       }
       return 0;
   }

  

cost=65.50; tax-cost 7/100; cost cost+tax: Total cost is: $59.99 He saved : $ 52.62


Related Solutions

Let’s say you have a light shop where you sale and purchase having different types of...
Let’s say you have a light shop where you sale and purchase having different types of light and different electric appliances. Now using principles of OOP I want you want make an OOP program which can cater the aforementioned problem.(show different types of purchase and sales ) C#
A discount store is having a sale where everything is 15% off. Write a program to...
A discount store is having a sale where everything is 15% off. Write a program to display a table showing the original price and the discounted price. This program requires no input and your table should include headings and the original prices should go from 99 cents to $9.99 in increments of 50 cents. Python
An office furniture store is having a sale on a certain type of office chair. The...
An office furniture store is having a sale on a certain type of office chair. The chairs are priced at GH¢800 per chair. The probability distribution for the number of chairs sold to an individual customer is Number of chairs 1 2 3 4 Probability 0.15 0.40 0.10 0.35 a) Find the probability that the number of chairs sold to an individual customer is odd. b) Find the expected number and standard deviation of chairs sold to an individual customer....
A retail store is having a sale. A shopper wanting two medium shirts heads for the...
A retail store is having a sale. A shopper wanting two medium shirts heads for the sales rack, which is a mess, with sizes jumbled together. Hanging on the rack are 4 medium, 11 large, and 5 extra-large shirts. Find the probability of each event described. (a) The first two shirts hehe grabs are the wrong size. (b) The first medium shirt hehe finds is the third one hehe checks. (c) The first four shirts hehe picks are all extra-large....
This problem requires you to use a heap to store items, but instead of using a key of an item to determine where to store the item in the heap
This problem requires you to use a heap to store items, but instead of using a key of an item to determine where to store the item in the heap, you need to assign a priority (key) to each item that will determine where it is inserted in the heap 7a) Show how to assign priorities to items to implement a first-in, first-out queue with a heap. 7b) Show how to assign priorities to items to implement a first-in, last-out stack with...
A local department store is having a BOGOHO (Buy One, Get One Half Off) sale. The...
A local department store is having a BOGOHO (Buy One, Get One Half Off) sale. The manager wants a program that allows salesclerks to enter the prices of two items. The program should calculate and display the total amount the customer owes. The half-off should always be taken on the item having the lowest price. If the items cost $24.99 and $10, the half-off would be taken off the $10 item. If both prices are equal, take the half-off on...
Here are some prices for randomly selected grocery items from the grocery store: Items Prices: Cheese...
Here are some prices for randomly selected grocery items from the grocery store: Items Prices: Cheese $3.29 Butter $4.99 Eggs $3.49 Yogurt $3.49 Juice $3.89 Tea $3.69 Chips $3.99 Soda $1.99 Pastry $2.99 Cerrial $4.99 Oats $3.29 Almond Milk $2.79 Almonds $4.39 Popcorn $3.29 Crackers $3.59 Ice Cream $6.99 Cookies $2.99 Jam $3.69 Peanut Butter $3.29 Coffee $3.19 Green Tea $4.99 BBQ Sauce $2.99 Oil $6.69 Mayonnaise $4.59 Mustard $2.99 1. Compute the sample mean x and the sample standard...
Here are some prices for randomly selected grocery items from the grocery store: Items Prices: Cheese...
Here are some prices for randomly selected grocery items from the grocery store: Items Prices: Cheese $3.29 Butter $4.99 Eggs $3.49 Yogurt $3.49 Juice $3.89 Tea $3.69 Chips $3.99 Soda $1.99 Pastry $2.99 Cerrial $4.99 Oats $3.29 Almond Milk $2.79 Almonds $4.39 Popcorn $3.29 Crackers $3.59 Ice Cream $6.99 Cookies $2.99 Jam $3.69 Peanut Butter $3.29 Coffee $3.19 Green Tea $4.99 BBQ Sauce $2.99 Oil $6.69 Mayonnaise $4.59 Mustard $2.99 1. Compute the sample mean x and the sample standard...
Here are some prices for randomly selected grocery items from the grocery store: Items Prices: Cheese...
Here are some prices for randomly selected grocery items from the grocery store: Items Prices: Cheese $3.29 Butter $4.99 Eggs $3.49 Yogurt $3.49 Juice $3.89 Tea $3.69 Chips $3.99 Soda $1.99 Pastry $2.99 Cerrial $4.99 Oats $3.29 Almond Milk $2.79 Almonds $4.39 Popcorn $3.29 Crackers $3.59 Ice Cream $6.99 Cookies $2.99 Jam $3.69 Peanut Butter $3.29 Coffee $3.19 Green Tea $4.99 BBQ Sauce $2.99 Oil $6.69 Mayonnaise $4.59 Mustard $2.99 1. Compute the sample mean x and the sample standard...
Here are some prices for randomly selected grocery items from the grocery store: Items Prices: Cheese...
Here are some prices for randomly selected grocery items from the grocery store: Items Prices: Cheese $3.29 Butter $4.99 Eggs $3.49 Yogurt $3.49 Juice $3.89 Tea $3.69 Chips $3.99 Soda $1.99 Pastry $2.99 Cerrial $4.99 Oats $3.29 Almond Milk $2.79 Almonds $4.39 Popcorn $3.29 Crackers $3.59 Ice Cream $6.99 Cookies $2.99 Jam $3.69 Peanut Butter $3.29 Coffee $3.19 Green Tea $4.99 BBQ Sauce $2.99 Oil $6.69 Mayonnaise $4.59 Mustard $2.99 1. Compute the sample mean x and the sample standard...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT