The question is:
Suppose the file Bid.txt contains a list of bids on a construction project. Write a program to analyze the list and report the two highest bids.
My file contains the following entries:25,000, 50,000, 28,000, 35,000
My answer is:
Private Sub cmdDisplay_Click()
Dim largest As Single, num As Single
'find largest two bid
picOutput.Cls
largest = 0
Open "C:\bid.txt" For Input As #1
Do While Not EOF(1)
Input #1, bid
If bid > largest ^ 2 Then
largest = largest ^ 2
End If
Loop
picOutput.Print "The Largest two bids are"; bid
End Sub
I'm not getting an error. the answer is 0 it is not giving me the 2 largest bids.