I need to write a program to solve for the following: Suppose that the file USPRES.txt contains the names fo the frist 43 United States presidents and the file USSENATE.TXT contains the names of all former and present US Senators. Write a program with nested loops that uses these files to display the names of the presidents who served in the Senate. This is for VB 2008 and here is what I have so far:

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

Dim filename As String
Dim president As String = ""
Dim sr1 As IO.StreamReader = IO.File.OpenText("C:Files.txt")
filename = sr1.ReadLine
Dim sr2 As IO.StreamReader = IO.File.OpenText(filename)
Do While (sr2.Peek <> -1)
president = sr2.ReadLine
Loop
ListBox1.Items.Add(president)

End Sub

Similar Questions
    1. answers icon 4 answers
  1. What is the main function of a file extension?to indicate how much space the file takes up to allow the file to be extended to
    1. answers icon 1 answer
  2. What is the main function of a file extension?to indicate how much space the file takes up to allow the file to be extended to
    1. answers icon 1 answer
    1. answers icon 0 answers
more similar questions