3 – rasm Biz dasturlash tilining Visual C++, proyektni turi nomini va saqlash joyini ko’rsatamiz, Ok tugmasini bosamiz va shunda 4 – rasmdagi oyna ochiladi.
4 – rasm
Bu oynada dastur interfeysini yaratamiz va u quyidagicha.
5 - rasm Bunda VS2008 ning asosiy oynasi va dasturiy qismi (kodi) saqlanuvchi fayl sahifasi ham ochiladi (6 – rasm). Bu sahifaga misolning dasturiy qismi yoziladi va shu faylda saqlanadi.
6 – rasm Dasturlashga o`tishdan oldin unig algaritmini tuzish kerak. Dasturlash algaritmi yuqorida ko`rsatilgandek bo`ladi. Namuna masalamizni dasturlash algaritmini ko`rib chiqamiz: Dastur qismini yozamiz.
Namuna masalamizga asosan dastur matni va natijasi. #pragma once namespace calc {
using namespace System; using namespace System::ComponentModel; using namespace System::Collections; using namespace System::Windows::Forms; using namespace System::Data; using namespace System::Drawing; int t=0; Double q=0; Double a=0; Double b=0; Double k=0; int amal=0; /// /// Summary for Form1 /// /// WARNING: If you change the name of this class, you will need to change the /// 'Resource File Name' property for the managed resource compiler tool /// associated with all .resx files this class depends on. Otherwise, /// the designers will not be able to interact properly with localized /// resources associated with this form. /// public ref class Form1 : public System::Windows::Forms::Form { public: Form1(void) { InitializeComponent(); // //TODO: Add the constructor code here // }
protected: /// /// Clean up any resources being used. /// ~Form1() { if (components) { delete components; } } private: System::Windows::Forms::TextBox^ textBox1; protected: private: System::Windows::Forms::Button^ button1;