' Visual Basic 2008 9.0 .NET Examples - Iterations - Introduction to Visual Basic : Module Exercise1Solution Sub Main() Console.WriteLine("Value ?") Dim value As Integer = Console.ReadLine() ' Dim factorial As Integer = value Dim factor As Integer = value - 1 ' For factor = value - 1 To 2 Step -1 factorial = factorial * factor Next ' Console.WriteLine(value & "! = " & factorial) ' Console.ReadLine() End Sub End Module ' Visit www.studyvb.com for more examples. Copyright 2003-2008 De Wolf.