Hacer una función EscribeFicheroNumeros a la que se le pasa un lista que contiene números enteros y un nombre de fichero, el que habrá que escribir los números enteros (cada uno en una línea).
Imports System.IO
Module Module1
Sub Main()
Dim n(10) As Integer
Dim i As Integer
Randomize()
Console.Write("Dame ruta y nombre de fichero: "
Dim s As String = Console.ReadLine
For i = 1 To 10
n(i) = Rnd() * 100 + 1
Next
escribeficheronumeros(s, n)
Console.WriteLine("Hecho."
Console.ReadKey()
End Sub
Sub escribeficheronumeros(ByVal f As String, ByVal n() As Integer)
Dim sw As StreamWriter
sw = New StreamWriter(f)
Dim i As Integer
For i = 1 To UBound(n)
sw.WriteLine(n(i))
Next
sw.Close()
End Sub
End Module


