Option Strict On
Module Module1

    Sub Main()
        Dim xmin, xmax, dx, x, sum, int As Double
        xmin = 0
        xmax = 1
        dx = 0.01
        For k As Integer = 0 To 8
            sum = 0
            For i As Integer = 1 To CInt((xmax - xmin) / dx - 1)
                x = xmin + i * dx
                sum = sum + Math.Exp(x) * (x ^ k)
            Next i
            int = dx * ((Math.Exp(0) * (0 ^ k) + Math.Exp(1) * (1 ^ k)) / 2 + sum)
            Console.WriteLine("{0}  {1}", k, int)
        Next k
        Console.ReadLine()
    End Sub

End Module
