Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void button1_Click(object sender, EventArgs e)
- {
- dataGridView1.RowCount = Convert.ToInt16(numericUpDown1.Value);
- }
- private void button2_Click(object sender, EventArgs e)
- {
- int n = Convert.ToInt16(numericUpDown1.Value);
- double[] a = new double[n];
- for (int i = 0; i < n; i++)
- {
- a[i] = Convert.ToDouble(dataGridView1.Rows[i].Cells[0].Value);
- }
- double v = a[0];
- for (int i = 0; i < n; i++)
- if (a[i] > 0)
- {
- v = v + a[i];
- }
- double v = a[0];
- for (int i = 0; i < n; i++)
Add Comment
Please, Sign In to add comment