DataGridView1.RowCount = 9 For i As Integer = 1 To 7 DataGridView1.Rows(i).Cells(0).Value = i Next Dim kq1 As Integer = 0 Dim kq2 As Integer = 0 Dim kq3 As Integer = 0 Dim kq4 As Integer = 0 Dim kq5 As Integer = 0 Dim kq6 As Integer = 0 Dim kq7 As Integer = 0 Dim a As Integer = DataGridView1.Rows(0).Cells(0).Value Dim b As Integer = DataGridView1.Rows(1).Cells(0).Value Dim c As Integer = DataGridView1.Rows(2).Cells(0).Value Dim d As Integer = DataGridView1.Rows(3).Cells(0).Value Dim e1 As Integer = DataGridView1.Rows(4).Cells(0).Value Dim f As Integer = DataGridView1.Rows(5).Cells(0).Value Dim g As Integer = DataGridView1.Rows(6).Cells(0).Value kq1 = a + b kq2 = c + kq1 kq3 = d + kq2 kq4 = e1 + kq3 kq5 = f + kq4 kq6 = g + kq5 DataGridView1.Rows(0).Cells(0).Value = kq1 DataGridView1.Rows(1).Cells(0).Value = kq2 DataGridView1.Rows(2).Cells(0).Value = kq3 DataGridView1.Rows(3).Cells(0).Value = kq4 DataGridView1.Rows(4).Cells(0).Value = kq5 DataGridView1.Rows(5).Cells(0).Value = kq6
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)