Help me please! Conditions of the problem: a 10x10 matrix should be created using a DataGridView. Determine the number of columns in which there is only one zero.
Here's what I got:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim i, j, n, k As Integer n = A.Rows.Count - 1 k = 0 For j = 0 To 9 If A(j, i).Value = 0 Then k = k + 1 End If Next TextBox1.Text = k End Sub Right or Not?