Monday 20 August 2012

Factorial Number in Vb.Net | Using For Next loop

Find out Factorial number of given number
Module Module1
    Dim a, i As Integer
    Dim fact As Integer

    Sub Main()
        Console.WriteLine("enter the number")
        a = Console.ReadLine()
        fact = 1
        i = 1
        For i = 1 To a
            fact = fact * i
        Next i
        Console.WriteLine("factorial is" & fact)
        Console.ReadLine()
    End Sub

End Module
Share This
Previous Post
Next Post

FYJC XI standard online admisson Process and declaraton of Merit list . Cut off List For prevous year also . 10 Th Results onlne declaraton Maharashtra Region .

0 comments: