Module Module1
    Function f(ByVal t As Double) As Double
        Return Math.Cos(t) - Math.Sin(t)
    End Function
    Function g(ByVal a As Double) As Double
        Return -(Math.Sin(a) + Math.Cos(a))
    End Function
    Sub Main()
        Dim t0 As Double = 0
        Dim a0 As Double = 0
        Dim t, a, v1, u1 As Double
        Dim u0 As Double = 1
        Dim v0 As Double = 1
        Dim t1 As Double = 0.2
        Dim a1 As Double = 0.2
        Dim dt As Double = 0.01
        Console.WriteLine("{0:F2}            {1:F4}            {2:F4}", t0, u0, v0)
        For i As Integer = 1 To CInt((t1 - t0) / dt)
            a = a0 + i * dt
            u0 += dt * f(t)
            v0 += dt * g(a)
            t = t0 + i * dt
            v1 = f(t)
            u1 = -g(a)
            Console.WriteLine("{0}   {1:F4}   {2:F4}   {3:F4}   {4:F4}", t, u0, u1, v0, v1)
        Next i
        Console.ReadLine()
    End Sub

End Module
