#include "iostream"
#include "conio.h"
#include "stdlib.h"
#include "form2.h"
int g,s;
#pragma endregion
private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) {
int a[10][10];
s=0;
int n=Convert::ToInt32(textBox1->Text);
int m=Convert::ToInt32(textBox2->Text);
for(int i=0;i if(g==0){dataGridView1->Rows->Add();}
for(int j=0;ja[i][j]=rand()%1001-125;
dataGridView1->Columns[j]- >HeaderText=(j+1).ToString()+" - ustun";
dataGridView1->Rows[i]->Cells[j]->Value =a[i][j].ToString();
if(a[i][j]%2==0){s+=a[i][j];}
}}
g+=1;
label4->Text="Juftlari yig'indisi= " + s.ToString();
}
Do'stlaringiz bilan baham: |