In: Computer Science
this is in excel VB8
Program 2: Software Sales A software company sells three packages, Package A, Package B, and Package C, which retail for $99, $199, and $299, respectively. Quantity discounts are given according to the following table: Quantity Discount 10 through 19 20% 20 through 49 30% 50 through 99 40% 100 or more 50% Create an application that allows the user to enter the number of units sold for each software package. The application should calculate and display the order amounts and the grand total. ENGR 1100 Asignación #2 - DECISIONS Deadline: Lunes 19 de octubre 2020, 11:50pm Input validation: Make sure the number of units for each package is not negative. Use the following test data to determine if the application is calculating properly: Units Sold Amount of Order Package A: 15 units Package A: $1,188.00 Package B: 75 units Package B: $8,955.00 Package C: 120 units Package C: $17,940.00 Grand Total: $28,083.00
this is in excel VB8
#include "Utility.h"
int main()
{
/* Hold constant for retail price */
const float RETAIL_PRICE = 99.0;
/* Hold sales, quantity and discount */
float quantity,
discount,
sumTotal;
/* Ask the user for the quantity sold */
cout << "Enter the amount of units sold:
";
cin >> quantity;
/* Format the output */
cout << fixed << showpoint <<
setprecision(2);
if (quantity > 0 && quantity <
10)
{
sumTotal = (quantity *
RETAIL_PRICE);
cout << "Sum Total: $"
<< sumTotal << endl;
}
else if (quantity >= 10 && quantity
<= 19)
{
discount = (quantity *
RETAIL_PRICE) * .2;
sumTotal = (quantity *
RETAIL_PRICE) - discount;
cout << "Sum Total: $"
<< sumTotal << endl;
}
else if (quantity >= 20 && quantity
<= 49)
{
discount = (quantity *
RETAIL_PRICE) * .3;
sumTotal = (quantity *
RETAIL_PRICE) - discount;
}
else if (quantity >= 50 && quantity
<= 99)
{
discount = (quantity *
RETAIL_PRICE) * .4;
sumTotal = (quantity *
RETAIL_PRICE) - discount;
cout << "Sum Total: $"
<< sumTotal << endl;
}
else if (quantity >= 100)
{
discount = (quantity *
RETAIL_PRICE) * .5;
sumTotal = (quantity *
RETAIL_PRICE) - discount;
cout << "Sum Total: $"
<< sumTotal << endl;
}
else
{
cout << "The quantity
must be greater than 0.\n";
}
pauseSystem();
return 0;
}