VB_2014_SLIP 30





SLIP 30_1
Option Explicit

Private Sub cmdSymmetric_Click()
Dim a(2, 2) As Integer
Dim i As Integer
Dim j As Integer
Dim flag As Byte
flag = 0
For i = 0 To 2
    For j = 0 To 2
        a(i, j) = Val(InputBox("Enter Array elements"))
    Next j
Next i
For i = 0 To 2
    For j = 0 To 2
       If a(i, j) <> a(j, i) Then
       Print "Matrix is not Symmetric"
       Exit Sub
       Else
        flag = 1
        End If
    Next j
Next i
If flag = 1 Then
Print "Matrix is symmetric"
End If
End Sub

No comments:

Post a Comment

Note: only a member of this blog may post a comment.