Function CalcPoints(CardNum As String, Total As Decimal) As Integer
OldPoints = CInt(Right(CardNum, Len(CardNum) - 7))
NewPoints = Int(Total * 1.2)
NewPoints = Int(Total * 1.1)
Function GetCardNum() As String
Dim File As IO.StreamReader
File = IO.File.OpenText("G:\CardNumbers.txt")
Function VerifyTotal() As Decimal
Console.WriteLine("Enter the amount spent: ")
Amount = Console.ReadLine
If Amount > 0 And Amount < 10000 Then
Points = CalcPoints(GetCardNum, VerifyTotal)
NewTotal = Points + OldPoints
Console.WriteLine("You had " & OldPoints & " points. Now you have " & NewTotal & " Points!")
Dim File As IO.StreamWriter
File = IO.File.AppendText("G:\CardNumbers.txt")