Skip to content

Instantly share code, notes, and snippets.

@theresajayne
Created April 27, 2014 22:22
Show Gist options
  • Save theresajayne/11357031 to your computer and use it in GitHub Desktop.
Save theresajayne/11357031 to your computer and use it in GitHub Desktop.
Module Module1
Dim iSales(4) As Double
Dim iTotals(4) As Double
Dim ID As Integer
Dim Name As String
Sub Main()
FileOpen(1, "XYZDatavb.dat", OpenMode.Input, , OpenShare.Shared)
ID = LineInput(1)
Name = LineInput(1)
Console.WriteLine(" X Y Z")
Console.WriteLine("Employee S A L E S R E P O R T")
Console.WriteLine("Name Mon Tu Wed Thr Fri")
Dim iTick1 As Integer
Dim iTick2 As Integer
Do Until iTick1 = 4
iSales(iTick1) = Double.Parse(LineInput(1))
iTotals(iTick1) += iSales(iTick1)
iTick1 += 1
Loop
Do While ID <> 999
Console.WriteLine(Name & " " & FormatCurrency(iSales(0)) & " " & FormatCurrency(iSales(1)) & " " & FormatCurrency(iSales(2)) & " " & FormatCurrency(iSales(3)) & " " & FormatCurrency(iSales(4)))
ID = LineInput(1)
Name = LineInput(1)
Do Until iTick2 = 4
iSales(iTick2) = Double.Parse(LineInput(1))
iTotals(iTick2) += iSales(iTick2)
iTick2 += 1
Loop
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