You are on page 1of 1

Dim cs As IO.

StreamReader
cs = IO.File.OpenText("D:\CARSALES1.TXT")
Dim newstr As String
Dim repairno As Integer
Dim found As Boolean
Console.WriteLine("Enter no of repair visit
s")
repairno = Console.ReadLine
While cs.Peek <> -1
newstr = fp.ReadLine
If Right(newstr, 1) >= repairno Then
Console.WriteLine(Mid(newstr, 7, 10
))
found = True
End If
End While
If found = False Then
Console.WriteLine("NO CARS FOUND")
Console.ReadLine()
End If
Console.ReadLine()
fp.Close()

You might also like