Friday 31 August 2012

Perfect number program source code in vb.net | login

How to write  Perfect number program code in vb.net using for loop and next
 Dim sum As Integer = 0
        Dim i As Integer
        For i = 1 To Convert.ToInt16(TextBox1.Text) - 1
            If (Convert.ToInt16(TextBox1.Text) Mod i = 0) Then
                sum += i
            End If
        Next
        If sum = Convert.ToInt16(TextBox1.Text) Then
            MsgBox("It is perfect no")
        Else
            MsgBox("It is no perfect no")
        End If
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: