Option Strict On
Module Module1
    Sub Main()
        Dim x, xmin, xmax, dx, l, eps, sum, n As Double
        xmin = 3
        xmax = 5.2
        dx = 0.2
        l = 1
        eps = 0.001
        For i As Integer = 0 To CInt((xmax - xmin) / dx)
            x = xmin + i * dx
            sum = 0
            n = 0
            Do
                n = n + 1
                sum = sum + (2 / Math.PI) * ((-1) ^ (n + 1) / n) * Math.Sin(n * Math.PI * x / l)
            Loop Until 1 / n < eps
            Console.WriteLine("{0:F2}  {1}", x, sum)
        Next i
        Console.ReadLine()
    End Sub
End Module
