Question: Debugsevenzas x Companion DebugSeven 3 . c 5 / / Program gets a quantity ordered from user I / then determines price and discount based

Debugsevenzas x
Companion
DebugSeven3.c5
// Program gets a quantity ordered from user
I/ then determines price and discount based on quantity
I/ price per item before discounts is $6.00
// order 15 or more, get a 20% discount
// order 10 to 14- get a 14% discount
// order 5 to 9, get a 10% discount
using Systems
using static System.Console;
using System.Globalization;
class DebugSeven3
{
static void Main()
{
int quantitys
double price;
quantity = GetQuantity () s
price = calculateprice]3 ing quantityle
Writeline("Final price for {0} items is {1}.
}
quantity, price.ToString("c'', cultureinfo.GetcultureInfo("en-us")));
private static Geteuantity()
i.
quan
Write ("Enter number of items ") s
quantity = Convert.ToInt32(ReadLine()):B
}
private calculateprice (moit quantityordered)
{
double PRICE_PER_ITEM =6.003
double price =08
double discount =f
int [] quantimits
doubile[]11mits
for (inf x=11mits. Length -1;x>08-x)
if (quantityordered 14mits[x])
discount =11mits[x];
x=08
price - quantttyondered * PRICE_PERITENA
 Debugsevenzas x Companion DebugSeven3.c5 // Program gets a quantity ordered from

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!