//Using unsigned, due to expecting the value to decrease later on.
unsigned long setCarStock = 15; /* <-- This value depends on how many cars each
brand has been assigned
Has to be adjusted manually, before the software starts */
//Source: https://canvas.anglia.ac.uk/courses/26905/pages/week-1-introduction-to-
computer-systems
/*Mercedes*/ unsigned short remainingBrandMercedes = 5, carsNeededMercedes = 0;
/*Bmw*/ unsigned short remainingBrandBmw = 5, carsNeededBmw = 0;
/*Audi*/ unsigned short remainingBrandAudi = 5, carsNeededAudi = 0;
/*Porsche*/ unsigned short remainingBrandPorsche = 0, carsNeededPorsche = 0;
/*Toyota*/ unsigned short remainingBrandToyota = 0, carsNeededToyota = 0;
/*Mercedes Float*/ /*Bmw Float*/ /*Audi Float*/
float totalPriceMercedes = 0; float totalPriceBmw = 0; float totalPriceAudi
= 0;
/*Porsche Float*/ /*Toyota Float*/
float totalPricePorsche = 0; float totalPriceToyota = 0;
//Discount floats
//Dividing by 100% to give us a float result, which we then multiply by the amount
//Of cars they have purchased, to give us the amount that needs to be discounted.
float divisonpercent = 100;
//Discount value attributes for Mercedes //Discount value attributes for
Audi
float discount_appliedMerc = 0; float discount_appliedAudi = 0;
float discount_divide_mercedes = 0; float discount_divide_audi = 0;
float updated_price_mercedes = 0; float updated_price_audi = 0;
//Discount value attributes for Bmw //Discount value attributes for
Porsche
float discount_appliedBmw = 0; float discount_appliedPorsche =
0;
float discount_divide_bmw = 0; float discount_divide_porsche =
0;
float updated_price_bmw = 0; float updated_price_porsche =
0;
//Discount value attributes for Toyota
float discount_appliedToyota = 0;
float discount_divide_toyota = 0;
float updated_price_toyota = 0;
//ARRAY - Car Models
char carModels[5][25] = { "Mercedes", "Bmw", "Audi", "Porsche", "Toyota" };
//ARRAY - Model Prices
float carPrices[] = { 25000.0, 22000.0, 11000.0, 12000.0, 18000.0 };
//ARRAY - Remaining amounts for each brand
unsigned short modelsRemainingAmount[] = { 5, 5, 5, 0, 0 };
//INTEGER variables
int i;
long long cardNumber;
short expDate;
short cardCode;