Skip to content

Instantly share code, notes, and snippets.

@theresajayne
Created April 27, 2014 22:51
Show Gist options
  • Save theresajayne/11357447 to your computer and use it in GitHub Desktop.
Save theresajayne/11357447 to your computer and use it in GitHub Desktop.
Module Module1
Dim iSales(5) As Double
Dim iTotals(5) As Double
Dim ID As Integer
Dim Name As String
Sub Main()
FileOpen(1, "C:\\Users\\Theresa\\Documents\\Visual Studio 2010\\Projects\\ConsoleApplication1\\ConsoleApplication1\\XYZDatavb.dat", OpenMode.Input, , OpenShare.Shared)
Console.WriteLine(" X Y Z")
Console.WriteLine("Employee S A L E S R E P O R T")
Console.WriteLine("Name Mon Tue Wed Thu Fri")
Dim iTick2 As Integer
iTick2 = 1
Do While ID <> 999
ID = LineInput(1)
Name = LineInput(1)
Do While iTick2 <= 5
iSales(iTick2) = Double.Parse(LineInput(1))
iTotals(iTick2) += iSales(iTick2)
iTick2 += 1
Loop
iTick2 = 1
Console.WriteLine(Name & " " & FormatCurrency(iSales(1)) & " " & FormatCurrency(iSales(2)) & " " & FormatCurrency(iSales(3)) & " " & FormatCurrency(iSales(4)) & " " & FormatCurrency(iSales(5)))
Loop
Console.WriteLine(" ")
Console.WriteLine("Weekday")
Console.WriteLine("Totals" & " " & FormatCurrency(iTotals(0)) & " " & FormatCurrency(iTotals(1)) & " " & FormatCurrency(iTotals(2)) & " " & FormatCurrency(iTotals(3)) & " " & FormatCurrency(iTotals(4)))
End Sub
End Module
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment