Option Strict On
Imports System.IO
Module Module1

    Sub Main()
        Dim out As StreamReader = New StreamReader("fileout.txt")
        Dim in_ As StreamWriter = New StreamWriter("filein.txt")
        Dim Xmin As Double = Double.Parse(out.ReadLine())
        Dim Xmax As Double = Double.Parse(out.ReadLine())
        Dim dX As Double = 0.1
        Dim X As Double
        in_.WriteLine("   X   sin(x)    cos(x)")
        in_.WriteLine("--------------------------")
        For i As Integer = 0 To CInt((Xmax - Xmin) / dX)
            X = Xmin + dX * i
            in_.WriteLine(" {0}  {1},   {2}", X, Math.Sin(X), Math.Cos(X))
        Next i
        out.Close()
        in_.Close()
        Console.ReadLine()
    End Sub

End Module
