CONST PROMPT_NUMBER_OF_WALLS = "Enter the number of walls to tile."
CONST PROMPT_NUMBER_OF_WALLS_ERROR = "Mistake entering the number of walls. Please try again."
CONST PROMPT_HEIGHT_OF_WALL = "Enter height of wall."
CONST PROMPT_HEIGHT_OF_WALL_ERROR = "Mistake entering the height of the wall. Please try again."
CONST PROMPT_WIDTH_OF_WALL = "Enter width of wall."
CONST PROMPT_WIDTH_OF_WALL_ERROR = "Mistake entering the width of the wall. Please try again."
Dim nTilePrices() as decimal = {19.50, 25.95, 35.75, 12.50, 11.00, 52.95, 65.00, 58.98, 85.00, 62.75}
Dim sTileNames() = {"Small Black Granite", "Small Grey Marble", "Small Powder Blue", "Medium Sunset Yellow", "Medium Berry Red", "Medium Glitter Purple", "Large Oak Wood Effect", "Large Black Granite", "Large Bamboo Effect", "Extra - Large White Marble"}
Dim sTileCodes() = {"SBG", "SGM", "SPB", "MSY", "MBR", "MBR", "MGP", "LOWE", "LBG", "LBE", "XLWM"}
Console.WriteLine("Tile descriptions")
For i = 0 to TILES_COUNT - 1
Console.WriteLine("{0} {1:$00.00}", sTileNames(i) & " (" & sTileCodes(i) & ")".PadRight(30), nTilePrices(i))
Dim nTileCode as integer = -1
Console.WriteLine("Enter tile code")
sTileCode = console.ReadLine()
sTileCode = sTileCode.ToUpper()
Do While i <= 9 and nTileCode = -1
if sTileCodes(i) = sTileCode
Dim nTotalBoxes as decimal = 0
Dim nTotalArea as decimal = 0
Dim nTotalPrice as decimal = 0
Dim nWallCount as integer = 0
console.WriteLine(PROMPT_HEIGHT_OF_WALL)
nHeight = console.ReadLine()
console.WriteLine(PROMPT_HEIGHT_OF_WALL_ERROR)
console.WriteLine(PROMPT_HEIGHT_OF_WALL)
nHeight = console.ReadLine()
console.WriteLine(PROMPT_WIDTH_OF_WALL)
nWidth = console.ReadLine()
console.WriteLine(PROMPT_WIDTH_OF_WALL_ERROR)
console.WriteLine(PROMPT_WIDTH_OF_WALL)
nWidth = console.ReadLine()
nArea = Math.Round(nHeight * nWidth)
nBoxes = Math.Ceiling(nHeight * nWidth)
nPrice = nTilePrices(nTileCode)
Console.WriteLine("Details for wall {0}", nwallCount)
Console.WriteLine("Area of Wall: {0}, Boxes of Tiles Required: {1}, Cost: {2:C}", nArea, nBoxes, nPrice)
Console.writeline("Total boxes so far: {0}, Total Cost: {1}",nTotalBoxes,nTotalPrice)
Console.WriteLine("Do you want to continue. Y for yes, N for No")
sContinue = Console.readline().ToUpper()
Loop Until sContinue = "N"
Console.WriteLine("Enter the amount wasted as a percentage of the amount used")
nWasteage = Console.ReadLine()
console.WriteLine("Error entering wasteage")
Console.WriteLine("Enter the amount wasted as a percentage of the amount used")
nWasteage = Console.ReadLine()
Dim nNewTotalBoxes as integer
Dim nNewTotalCost as decimal
nNewTotalBoxes = Math.Ceiling((nTotalBoxes * (1 + nWasteage/100)))
nNewTotalCost = nTilePRices(nTileCode) * nNewTotalBoxes
Console.WriteLine("Final Amounts")
Console.Write("Total Number of Boxes Including Wasteage: {0}, Total Cost: {1:C}", nNewTotalBoxes, nNewTotalCost)