dim buyernumber as integer
dim itemnumber(3) as integer
dim description(3) as string
dim bidnumber(3) as integer
dim highest(3) as integer
console.WriteLine("write description for item " & counter)
description(counter)=Console.ReadLine()
console.WriteLine(description(counter))
console.WriteLine("enter reserve price for item "& counter)
do while integer.TryParse(Console.ReadLine,reserve(counter))=False
console.WriteLine("enter intger please, in the form of number")
console.WriteLine(reserve(counter))
console.WriteLine(counter)
console.WriteLine (description(counter))
console.WriteLine(reserve(counter))
dim instruction as string
console.WriteLine("if you want to search for an item, enter letter s. if you want to exit, enter letter q." )
instruction= console.ReadLine()
do until instruction = "q"
console.WriteLine("enter the item number that you want to search for, from 1 to 3.")
counter=console.ReadLine()
console.WriteLine("Item number "&counter)
console.writeline("description: "&description(counter))
console.WriteLine("current reserve price: "&reserve(counter))
console.WriteLine("current bid number: " & bidnumber(counter))
console.writeline("do you want to bid? yes or no?")
answer = console.readline()
console.WriteLine("enter s to continue bidding. enter q to quit.")
instruction=console.ReadLine()
console.WriteLine("what's your bid price for this item?")
buyerprice=console.ReadLine()
if buyerprice>highest(counter) then
highest(counter)=buyerprice
console.WriteLine("your price is okay. enter your buyer number.")
buyernumber=console.ReadLine()
bidnumber(counter)=bidnumber(counter)+1
console.WriteLine("you have successfully bidded.")
console.WriteLine("enter s to continue bidding. enter q to quit.")
instruction=console.ReadLine()
console.writeline("your price is lower than the current highest price. Failed.")
console.WriteLine("enter s to continue bidding. enter q to quit.")
instruction=console.ReadLine()
console.WriteLine("Invalid input. You are now back to start. Enter s for search or q for exit)")
instruction=console.ReadLine()
console.WriteLine("Invalid input. Enter again(s for search or q for exit)")
instruction=console.ReadLine()
console.writeline("bye then")
dim companyfee(3) as double
dim totalfee(3) as double
if highest(counter)>=reserve(counter) then
companyfee(counter)=0.1*highest(counter)
totalfee(counter)=highest(counter)+ companyfee(counter)
console.WriteLine("item " & counter & " is sold with a total fee of "&totalfee(counter))
elseif highest(counter)<reserve(counter) and bidnumber(counter)<>0 then
console.WriteLine("item " & counter & " is not sold and the highest bid price is " & highest(counter))
elseif bidnumber(counter)=0 then
console.WriteLine("item "& counter & " received no bids at all.")
console.WriteLine("Number of item sold: " & sold)
console.WriteLine("Number of item unsold which didn't meet reserve prices: "&unsold)
console.WriteLine("Number of item receiving no bids: "&nobid)