Abdijabborov Dovurbek PRG001-1-Tekshirdi - Shokirov Shodmon Shoyimovich
Abdijabborov Dovurbek PRG001-1-Tekshirdi - Shokirov Shodmon Shoyimovich
Dastur kodi
#pragma once
#include <algorithm>
namespace WindowsFormsApplication11 {
using namespace System;
using namespace System::ComponentModel;
using namespace System::Collections;
using namespace System::Windows::Forms;
using namespace System::Data;
using namespace System::Drawing;
protected:
~Form1() {
if (components) {
delete components;
}
}
private: System::Windows::Forms::Label^ label1;
protected:
private: System::Windows::Forms::Label^ label2;
private: System::Windows::Forms::TextBox^ textBox1;
private: System::Windows::Forms::TextBox^ textBox2;
private: System::Windows::Forms::DataGridView^ dataGridView1;
private: System::Windows::Forms::Label^ label4;
private: System::Windows::Forms::Button^ button1;
private: System::Windows::Forms::Label^ label3;
private:
System::ComponentModel::Container ^components;
void InitializeComponent(void) {
System::ComponentModel::ComponentResourceManager^ resources =
(gcnew System::ComponentModel::ComponentResourceManager(Form1::typeid));
this->label1 = (gcnew System::Windows::Forms::Label());
this->label2 = (gcnew System::Windows::Forms::Label());
this->textBox1 = (gcnew System::Windows::Forms::TextBox());
this->textBox2 = (gcnew System::Windows::Forms::TextBox());
this->dataGridView1 = (gcnew
System::Windows::Forms::DataGridView());
this->label4 = (gcnew System::Windows::Forms::Label());
this->button1 = (gcnew System::Windows::Forms::Button());
this->label3 = (gcnew System::Windows::Forms::Label());
(cli::safe_cast<System::ComponentModel::ISupportInitialize^
>(this->dataGridView1))->BeginInit();
this->SuspendLayout();
//
// label1
//
this->label1->AutoSize = true;
this->label1->Location = System::Drawing::Point(45, 124);
this->label1->Name = L"label1";
this->label1->Size = System::Drawing::Size(27, 13);
this->label1->TabIndex = 7;
this->label1->Text = L"N = ";
//
// label2
//
this->label2->AutoSize = true;
this->label2->Location = System::Drawing::Point(45, 154);
this->label2->Name = L"label2";
this->label2->Size = System::Drawing::Size(28, 13);
this->label2->TabIndex = 6;
this->label2->Text = L"M = ";
//
// textBox1
//
this->textBox1->Location = System::Drawing::Point(81, 121);
this->textBox1->Name = L"textBox1";
this->textBox1->Size = System::Drawing::Size(100, 20);
this->textBox1->TabIndex = 5;
//
// textBox2
//
this->textBox2->Location = System::Drawing::Point(81, 151);
this->textBox2->Name = L"textBox2";
this->textBox2->Size = System::Drawing::Size(100, 20);
this->textBox2->TabIndex = 4;
//
// dataGridView1
//
this->dataGridView1->ColumnHeadersHeightSizeMode =
System::Windows::Forms::DataGridViewColumnHeadersHeightSizeMode::AutoSize;
this->dataGridView1->Location = System::Drawing::Point(247,
121);
this->dataGridView1->Name = L"dataGridView1";
this->dataGridView1->Size = System::Drawing::Size(400, 300);
this->dataGridView1->TabIndex = 2;
//
// label4
//
this->label4->AutoSize = true;
this->label4->Location = System::Drawing::Point(45, 284);
this->label4->Name = L"label4";
this->label4->Size = System::Drawing::Size(0, 13);
this->label4->TabIndex = 0;
//
// button1
//
this->button1->Location = System::Drawing::Point(81, 234);
this->button1->Name = L"button1";
this->button1->Size = System::Drawing::Size(100, 23);
this->button1->TabIndex = 1;
this->button1->Text = L"Hisobla";
this->button1->Click += gcnew System::EventHandler(this,
&Form1::button1_Click);
//
// label3
//
this->label3->Font = (gcnew System::Drawing::Font(L"Microsoft
Sans Serif", 9.75F, System::Drawing::FontStyle::Bold,
System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(204)));
this->label3->Location = System::Drawing::Point(81, 9);
this->label3->Name = L"label3";
this->label3->Size = System::Drawing::Size(566, 83);
this->label3->TabIndex = 8;
this->label3->Text = resources->GetString(L"label3.Text");
//
// Form1
//
this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
this->AutoScaleMode =
System::Windows::Forms::AutoScaleMode::Font;
this->ClientSize = System::Drawing::Size(684, 433);
this->Controls->Add(this->label3);
this->Controls->Add(this->label4);
this->Controls->Add(this->button1);
this->Controls->Add(this->dataGridView1);
this->Controls->Add(this->textBox2);
this->Controls->Add(this->textBox1);
this->Controls->Add(this->label2);
this->Controls->Add(this->label1);
this->Name = L"Form1";
this->Text = L"Form1";
(cli::safe_cast<System::ComponentModel::ISupportInitialize^
>(this->dataGridView1))->EndInit();
this->ResumeLayout(false);
this->PerformLayout();
dataGridView1->RowCount = N;
dataGridView1->ColumnCount = M;
for (int i = 0; i < N; i++) {
for (int j = 0; j < M; j++) {
dataGridView1->Rows[i]->Cells[j]->Value = a[i, j];
}
}
};
}
Natija