SHARE
TWEET

Untitled

a guest May 19th, 2019 82 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     Sub Main()
  2.         Dim Reserve_Price() As Double = {799, 1200, 5000, 900, 500, 3202, 8000, 750, 980, 145}
  3.         Dim Item_number() As Double = {895, 766, 454, 128, 362, 742, 255, 657, 157, 698}
  4.         Dim Item_Description() As String = {"Swatch", "Tissot", "Rolex", "Tommy Helfieger", "Patek Phileppe", "Audemars Piguet", "Brietling", "Omega", "Gucci", "Louis Vutton"}
  5.         Dim Number_bids() As Double = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
  6.         Dim High_Bid() As Double = {661, 323, 877, 367, 15415, 600, 875, 450, 650, 1080}
  7.         Dim Tot_items = 9
  8.         Dim buyer_id(Tot_items) As Double
  9.         Console.WriteLine("Item searching.......1 through item number.....2 through description.......any other digits to cancel searching")
  10.  
  11.         Dim search As Double = 0
  12.         Dim search_itnum As Double = 0
  13.         Dim search_itdes As String
  14.         Dim found_num As Double = 0
  15.         search = Console.ReadLine()
  16.         Dim index As Double = 0
  17.         If search = 1 Then
  18.             Console.WriteLine("What is the item number?")
  19.             search_itnum = Console.ReadLine()
  20.             For index = 0 To Tot_items
  21.                 If search_itnum = Item_number(index) Then
  22.                     found_num = index
  23.                     Console.WriteLine(found_num & "  " & Item_number(found_num) & "  " & Item_Description(found_num) & "  " & High_Bid(found_num) & "   " & Number_bids(found_num))
  24.                     Console.WriteLine("Item has been found")
  25.                 End If
  26.             Next
  27.         ElseIf search = 2 Then
  28.             Console.WriteLine("What is the item number?")
  29.             search_itdes = Console.ReadLine()
  30.             For index = 0 To Tot_items
  31.                 If search_itdes = Item_Description(index) Then
  32.                     found_num = index
  33.                     Console.WriteLine("Index number=" & found_num & "  " & Item_number(found_num) & "  " & Item_Description(found_num) & "  " & High_Bid(found_num) & "   " & Number_bids(found_num))
  34.                     Console.WriteLine("Item has been found")
  35.                 End If
  36.             Next
  37.         Else
  38.             Console.WriteLine("Search Prevented")
  39.         End If
  40.  
  41.         Dim input_user As Double = 0
  42.         Dim user_price As Double = 0
  43.         Do Until input_user = -1
  44.             Console.WriteLine("Input the index number from the above searched or personally seen, a value of -1 will terminate the bidding process")
  45.             input_user = Console.ReadLine()
  46.             If input_user <> -1 Then
  47.                 Console.WriteLine("Item Description  :" & Item_Description(input_user))
  48.                 Console.WriteLine("Item Number  :" & Item_number(input_user))
  49.                 Console.WriteLine("Current Highest Bid =" & High_Bid(input_user) & "    " & "Input a value higher to be accepted")
  50.                 Do Until user_price > High_Bid(input_user)
  51.                     Console.WriteLine("Input a greater price at which you are willing to bid")
  52.                     user_price = Console.ReadLine()
  53.                 Loop
  54.                 High_Bid(input_user) = user_price
  55.                 Console.WriteLine("Enter your Buyer ID")
  56.                 Number_bids(input_user) = Number_bids(input_user) + 1
  57.                 buyer_id(input_user) = Console.ReadLine
  58.                 Console.WriteLine("Happy Bidding!")
  59.             End If
  60.         Loop
  61.     End Sub
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top