dim Category(16) , ItemCode(16) , Description(16) as string
dim Price(16) , TotalMoney , TotalMoney2 , Reduction , TotalReduction , SumDevice , EndPrice As Decimal
dim ChosenDevice , ChosenSIM , ChosenDevice2 , ChosenCase , ChosenCharger , ChosenCharger2 as integer
dim ChoiceNo , DeviceCounter as integer
dim MobilePurchased(4) , TabletPurchased(4) as integer
Category = {"Phone","Phone","Phone","Phone","Phone","Phone","Tablet","Tablet","Tablet","Tablet","SIM card","SIM card","Case","Case","Charger","Charger"}
ItemCode = {"BPCM","BPSH","RPSS","RPLL","YPLS","YPLL","RTMS","RTLM","YTLM","YTLL","SMNO","SMPG","CSST","CSLX","CGCR","CGHM"}
Description = {"Compact","Clam Shell","RoboPhone 5-inch screen and 64GB memory","RoboPhone 6-inch screen and 256GB memory","Y-Phone Standard 6-inch screen and 64GB memory",
"Y-Phone Deluxe 6-inch screen and 256GB memory","RoboTab 8-inch screen and 64GB memory","RoboTab 10-inch screen and 128GB memory",
"Y-Tab Standard 10-inch screen and 128GB memory","Y-Tab Deluxe 10-inch screen and 256GB memory","SIM Free (no SIM card purchased)",
"Pay As You Go (SIM card purchased)","Standard","Luxury","Car","Home"}
Price = {29.99,49.99,199.99,499.99,549.99,649.99,149.99,299.99,499.99,599.99,0,9.99,0,50,19.99,15.99}
console.WriteLine("please select a number")
console.WriteLine("1-phone")
console.WriteLine("2-Tablet")
ChoiceNo = console.ReadLine()
console.WriteLine(i & "-" & Category(i) & ItemCode(i) & Description(i) & "$" & Price(i))
console.WriteLine("please select a phone number from list (0-5)")
ChosenDevice = console.ReadLine()
console.WriteLine("please select a SIM number from list (10,11)")
console.WriteLine("1- SIM Free")
console.WriteLine("2- SIM Pay As You Go")
ChosenSIM = console.ReadLine()
Loop Until ChosenSIM =1 OR ChosenSIM=2
Loop until ( ChosenDevice >= 0 ) AND ( ChosenDevice <= 5 )
MobilePurchased(0) = ChosenDevice
ELSE IF ChosenSIM = 2 THEN
console.WriteLine(i & "-" & Category(i) & ItemCode(i) & Description(i) & "$" & Price(i))
console.WriteLine("please select a tablet number from list (6-9)")
ChosenDevice = console.ReadLine()
Loop until ( ChosenDevice >= 6) AND (ChosenDevice <= 9 )
TabletPurchased(0) = ChosenDevice
console.WriteLine(" please select a case number from list (12,13)")
console.WriteLine(" 1- standard ")
console.WriteLine(" 2- luxury ")
ChosenCase = console.ReadLine()
IF ChoiceNo = 1 AND ChosenCase = 1 THEN
ELSE MobilePurchased(2) = 13
IF ChoiceNo = 2 AND ChosenCase = 1 THEN
IF ChoiceNo = 2 AND ChosenCase = 2 THEN
IF ChosenCase <> 1 OR ChosenCase <> 2 THEN
console.WriteLine("Please re-enter case number from list ")
console.WriteLine("1- standard ")
console.WriteLine("2- luxury ")
console.WriteLine("please select a charger number from list (14,15)")
console.WriteLine("1- Both ")
console.WriteLine("2- None ")
console.WriteLine("3- Only one ")
ChosenCharger = console.ReadLine()
console.WriteLine("please select type of charger ")
console.WriteLine("1- Home Charger ")
console.WriteLine("2- Car Charger ")
ChosenCharger2 = console.ReadLine()
IF ChosenCharger2 = 1 THEN
IF ChosenCharger2 = 2 THEN
console.WriteLine("please re-enter a charger number from list ")
console.WriteLine("1- Both ")
console.WriteLine("2- None ")
console.WriteLine("3- Only one ")
console.WriteLine("please select type of charger ")
console.WriteLine("1- Home Charger ")
console.WriteLine("2- Car Charger ")
ChosenCharger2 = console.ReadLine()
IF ChosenCharger2 = 1 THEN
IF ChosenCharger2 = 2 THEN
console.WriteLine("please re-enter a charger number from list ")
console.WriteLine("1- Both ")
console.WriteLine("2- None ")
console.WriteLine("3- Only one ")
console.WriteLine( Category(MobilePurchased(i)) & ItemCode(MobilePurchased(i)) & Description(MobilePurchased(i)) & "$" & Price(MobilePurchased(i)))
If MobilePurchased(i) > 0
TotalMoney = TotalMoney + Price(MobilePurchased(i))
console.WriteLine("Total money paid =" & "$" & TotalMoney)
console.WriteLine( Category(TabletPurchased(i)) & ItemCode(TabletPurchased(i)) & Description(TabletPurchased(i)) & "$" & Price(TabletPurchased(i)))
If TabletPurchased(i) > 0 then
TotalMoney = TotalMoney + Price(TabletPurchased(i))
console.WriteLine("Total money paid =" & "$" & TotalMoney)
console.WriteLine("Do you want to buy an additional device (phone or tablet) ")
console.WriteLine("please type 1 or 2")
console.WriteLine("1-Yes")
console.WriteLine("2-No")
ChosenDevice2 = console.ReadLine()
Do While ChosenDevice2 = "1"
DeviceCounter = DeviceCounter + 1
console.WriteLine("please select a number")
console.WriteLine("1-phone")
console.WriteLine("2-Tablet")
ChoiceNo = console.ReadLine()
console.WriteLine(i & "-" & Category(i) & ItemCode(i) & Description(i) & "$" & Price(i))
console.WriteLine("please select a phone number from list (0-5)")
ChosenDevice = console.ReadLine()
console.WriteLine("please select a SIM number from list (10,11)")
console.WriteLine("1- SIM Free")
console.WriteLine("2- SIM Pay As You Go")
ChosenSIM = console.ReadLine()
Loop Until ChosenSIM =1 OR ChosenSIM=2
Loop until ( ChosenDevice >= 0 ) AND ( ChosenDevice <= 5 )
MobilePurchased(0) = ChosenDevice
ELSE IF ChosenSIM = 2 THEN
console.WriteLine(i & "-" & Category(i) & ItemCode(i) & Description(i) & "$" & Price(i))
console.WriteLine("please select a tablet number from list (6-9)")
ChosenDevice = console.ReadLine()
Loop until ( ChosenDevice >= 6) AND (ChosenDevice <= 9 )
TabletPurchased(0) = ChosenDevice
console.WriteLine(" please select a case number from list (12,13)")
console.WriteLine(" 1- standard ")
console.WriteLine(" 2- luxury ")
ChosenCase = console.ReadLine()
IF ChoiceNo = 1 AND ChosenCase = 1 THEN
ELSE MobilePurchased(2) = 13
IF ChoiceNo = 2 AND ChosenCase = 1 THEN
IF ChoiceNo = 2 AND ChosenCase = 2 THEN
IF ChosenCase <> 1 OR ChosenCase <> 2 THEN
console.WriteLine("Please re-enter case number from list ")
console.WriteLine("1- standard ")
console.WriteLine("2- luxury ")
console.WriteLine("please select a charger number from list (14,15)")
console.WriteLine("1- Both ")
console.WriteLine("2- None ")
console.WriteLine("3- Only one ")
ChosenCharger = console.ReadLine()
console.WriteLine("please select type of charger ")
console.WriteLine("1- Home Charger ")
console.WriteLine("2- Car Charger ")
ChosenCharger2 = console.ReadLine()
IF ChosenCharger2 = 1 THEN
IF ChosenCharger2 = 2 THEN
console.WriteLine("please re-enter a charger number from list ")
console.WriteLine("1- Both ")
console.WriteLine("2- None ")
console.WriteLine("3- Only one ")
console.WriteLine("please select type of charger ")
console.WriteLine("1- Home Charger ")
console.WriteLine("2- Car Charger ")
ChosenCharger2 = console.ReadLine()
IF ChosenCharger2 = 1 THEN
IF ChosenCharger2 = 2 THEN
console.WriteLine("please re-enter a charger number from list ")
console.WriteLine("1- Both ")
console.WriteLine("2- None ")
console.WriteLine("Do you want to buy an additional device (phone or tablet) ")
console.WriteLine("please type 1 or 2")
console.WriteLine("1-Yes")
console.WriteLine("2-No")
ChosenDevice2 = console.ReadLine()
console.WriteLine( Category(MobilePurchased(i)) & ItemCode(MobilePurchased(i)) & Description(MobilePurchased(i)) & "$" & Price(MobilePurchased(i)))
If MobilePurchased(i) > 0 AND DeviceCounter > 0 Then
TotalMoney2 = TotalMoney + Price(MobilePurchased(0))
SumDevice = Price(MobilePurchased(0)) * 0.9
Reduction = Price(MobilePurchased(0)) - SumDevice
TotalReduction = TotalReduction + Reduction
EndPrice = TotalMoney2 - TotalReduction
console.WriteLine("Total money paid =" & "$" & TotalMoney)
console.WriteLine("overall reduction = $" & TotalReduction )
console.WriteLine(SumDevice)
console.WriteLine(Reduction)
console.WriteLine(EndPrice)
console.writeline("......................")
console.WriteLine( Category(TabletPurchased(i)) & ItemCode(TabletPurchased(i)) & Description(TabletPurchased(i)) & "$" & Price(TabletPurchased(i)))
If TabletPurchased(i) > 0 AND DeviceCounter > 0 then
TotalMoney2 = TotalMoney + Price(TabletPurchased(0))
SumDevice = Price(TabletPurchased(0)) * 0.9
Reduction = Price(TabletPurchased(0)) - SumDevice
TotalReduction = TotalReduction + Reduction
EndPrice = TotalMoney2 - TotalReduction
console.WriteLine("Total money paid =" & "$" & TotalMoney)
console.WriteLine("total money paid after discount = $" & TotalMoney2)
console.WriteLine("overall reduction = $" & TotalReduction )
console.WriteLine(SumDevice)
console.WriteLine(Reduction)
console.WriteLine(EndPrice)
console.writeline("......................")