Sharof rashidov nomidagi samarqand davlat universiteti matematika fakulteti
Download 225.92 Kb. Pdf ko'rish
|
1-topshiriq
- Bu sahifa navigatsiya:
- Amaliyot topshirigi
O’ZBEKISTON RESPUBLIKASI OLIY VA O’RTA-MAXSUS TA’LIM VAZIRLIGI SHAROF RASHIDOV NOMIDAGI SAMARQAND DAVLAT UNIVERSITETI MATEMATIKA FAKULTETI AMALIY MATEMATIKA YO’NALISHI 319 - guruh talabasi Normamatov Dostonning Programmalash asoslari fanidan Amaliyot topshirig'i Bajardi: Normamatov D Tekshirdi: Eshonqulov E SAMARQAND – 2022 1-topshiriq. Temperatura TF gradus Selsiyda berilgan. Temperatura qiymatini TC Farangeytga o’tkazuvchi dastur tuzing.(Ko’rsatma: TC = (TF – 32)∙5/9, 1 ta Label, 1 ta TextBox, 1 ta Button. NatijalarLabelda chiqarilsin). Dastur kodi. #pragma once namespace _1_topshiriq { using namespace System; using namespace System::ComponentModel; using namespace System::Collections; using namespace System::Windows::Forms; using namespace System::Data; using namespace System::Drawing; /// /// Summary for MyForm /// public ref class MyForm : public System::Windows::Forms::Form { public: MyForm(void) { InitializeComponent(); // //TODO: Add the constructor code here // } protected: /// /// Clean up any resources being used. /// ~MyForm() { if (components) { delete components; } } private: System::Windows::Forms::Label^ label1; protected: private: System::Windows::Forms::Button^ button1; private: System::Windows::Forms::Label^ label2; private: System::Windows::Forms::TextBox^ textBox1; private: System::Windows::Forms::ProgressBar^ progressBar1; private: /// /// Required designer variable. /// System::ComponentModel::Container ^components; #pragma region Windows Form Designer generated code /// /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// void InitializeComponent(void) { this->label1 = (gcnew System::Windows::Forms::Label()); this->button1 = (gcnew System::Windows::Forms::Button()); this->label2 = (gcnew System::Windows::Forms::Label()); this->textBox1 = (gcnew System::Windows::Forms::TextBox()); this->progressBar1 = (gcnew System::Windows::Forms::ProgressBar()); this->SuspendLayout(); // // label1 // this->label1->AutoSize = true; this->label1->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, static_cast this->label1->Location = System::Drawing::Point(12, 25); this->label1->Name = L"label1"; this->label1->RightToLeft = System::Windows::Forms::RightToLeft::No; this->label1->Size = System::Drawing::Size(262, 20); this->label1->TabIndex = 0; this->label1->Text = L"Temperaturani selsiyda kiriting: "; // // button1 // this->button1->BackColor = System::Drawing::Color::LightGray; this->button1->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point, static_cast this->button1->Location = System::Drawing::Point(32, 124); this->button1->Name = L"button1"; this->button1->Size = System::Drawing::Size(75, 29); this->button1->TabIndex = 2; this->button1->Text = L"Natija"; this->button1->UseVisualStyleBackColor = false; this->button1->Click += gcnew System::EventHandler(this, &MyForm::button1_Click); // // label2 // this->label2->AutoSize = true; this->label2->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point, static_cast this->label2->Location = System::Drawing::Point(194, 128); this->label2->Name = L"label2"; this->label2->Size = System::Drawing::Size(0, 20); this->label2->TabIndex = 3; // // textBox1 // this->textBox1->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point, static_cast this->textBox1->Location = System::Drawing::Point(272, 22); this->textBox1->Multiline = true; this->textBox1->Name = L"textBox1"; this->textBox1->Size = System::Drawing::Size(57, 28); this->textBox1->TabIndex = 4; this->textBox1->Text = L" "; // // progressBar1 // this->progressBar1->BackColor = System::Drawing::Color::Lime; this->progressBar1->Location = System::Drawing::Point(16, 72); this->progressBar1->Name = L"progressBar1"; this->progressBar1->RightToLeft = System::Windows::Forms::RightToLeft::No; this->progressBar1->Size = System::Drawing::Size(310, 23); this->progressBar1->TabIndex = 5; // // MyForm // this->AutoScaleDimensions = System::Drawing::SizeF(6, 13); this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font; this->BackColor = System::Drawing::Color::Turquoise; this->ClientSize = System::Drawing::Size(338, 180); this->Controls->Add(this->progressBar1); this->Controls->Add(this->textBox1); this->Controls->Add(this->label2); this->Controls->Add(this->button1); this->Controls->Add(this->label1); this->Name = L"MyForm"; this->Text = L"MyForm"; this->ResumeLayout(false); this->PerformLayout(); } #pragma endregion private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) { int a, b; a = Convert::ToInt32(textBox1->Text); b = ((9 * a) / 5) + 32; this->progressBar1->Value = 100; label2->Text = Convert::ToString(b+" Farengeyt"); } }; } Dastur natijasi. Download 225.92 Kb. Do'stlaringiz bilan baham: |
Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling
ma'muriyatiga murojaat qiling