Dim n as Integer Dim Fac as Integer Fac = 1 Dim i as Integer For i = 2 To n Fac = Fac * i Next i Console.Write( Fac.ToString() )