Module Module1 Sub Main() FileOpen(1, "data3.txt", OpenMode.Input) FileOpen(2, "out3.txt", OpenMode.Output) For i As Integer = 1 To 5 Dim intnum As Integer Dim tempvalue As Integer Dim binvalue As String Dim finalbin As Integer Dim counter As Integer counter = 0 binvalue = "" intnum = CInt(LineInput(1)) If intnum = 0 Then finalbin = 0 PrintLine(2, "0") Else Do tempvalue = intnum Mod 2 If tempvalue = 1 Then counter = counter + 1 End If binvalue = CStr(tempvalue) + binvalue intnum = intnum \ 2 Loop Until intnum = 0 If counter Mod 2 = 1 Then PrintLine(2, "1") Else PrintLine(2, "0") End If End If Next End Sub End Module