9. Kubning hajmi V berilgan. Kubning yon sirti yuzini aniqlang. Natija Labelda chop etilsin.
10. Bankka yiliga B foizli daromad olish uchun qo’yilgan A so’m pulning M yildan keyingi qiymatini Labelda chop eting.
double a, b, s, s1, m;
b = Convert::ToInt16(textBox1->Text);
a = Convert::ToInt16(textBox2->Text);
m = Convert::ToInt16(textBox3->Text);
s = 0;
s1 = ((a*b) / 100);
for (int i = 1; i <= m;i++) {
s += s1;
a += s;
}
label4->Text = "Foyda : " + Convert::ToString(s) + " so'm";
11. Bir nuqtadan chiqqan avtomobillarning birinchisining tezligi A km/soat, ikkinchisining tezligi B km/soat bo’lsin. T vaqtdan keyin ular orasidagi masofa Labelda chop etilsin.
12. Boshlang’ich tezligi v0 bo’lib, a tezlanish bilan tekis harakat qilayotgan moddiy nuqtaning t vaqt ichida bosib o’tadigan yo’lini Labelda chop eting (Formula:
02/2)
13. Yer sirtiga nisbatan burchak ostida 0 boshlang’ich tezlik bilan otilgan jismning uchish masofasini aniqlang (Formula: 02 ( ) , )
Uch kishining yoshlari miqodir ma’lum. Yoshlarning o’rtacha qiymatini Labelda chop eting
Qalamning ranglari 4 ta RadioButtonda qiymat sifatida berilgan. Tanlangan qalam rangini MessageBox oynasida chop etadigan dastur yozing
private: int location = 88;
private: int locat1 = 18;
private: System::Void button1_Click(System::Object^ sender, System::EventArgs^
e) {
if (textBox1->Text == "") return;
//(125, 19)
if (location > 250) {
location = 23;
locat1 += 95;
}
else {
location += 23;
}
RadioButton ^rb4 = gcnew RadioButton();
rb4->Location = System::Drawing::Point(locat1, location);
rb4->Text = textBox1->Text;
rb4->Size = System::Drawing::Size(85, 17);
rb4->CheckedChanged += gcnew System::EventHandler(this,
&TAsk4::anyRB_CheckedChanged);
Color ^ a = Color::FromName(textBox1->Text);
if (a->IsKnownColor) {
rb4->ForeColor = Color::FromName(textBox1->Text);
}
else
rb4->ForeColor = System::Drawing::SystemColors::ControlText;
this->groupBox1->Controls->Add(rb4);
textBox1->Text = "";
}
private: System::Void anyRB_CheckedChanged(System::Object^ sender,
System::EventArgs^ e) {
try{
RadioButton ^rb = safe_cast(sender);
if (rb != nullptr && rb->Checked)
{
if (rb->ForeColor !=
System::Drawing::SystemColors::ControlText) {
this->BackColor = rb->ForeColor;
/*if(this->BackColor == Color::Black)
rb->ForeColor = Color::White;
else
rb->ForeColor = Color::Black;*/
}
else {
this->BackColor =
System::Drawing::SystemColors::Control;
}
MessageBox::Show(rb->Text, "Xabar",
MessageBoxButtons::OK);
}
}
catch (String ^ err)
{
MessageBox::Show(err, "Error", MessageBoxButtons::OK);
}
}
Do'stlaringiz bilan baham: |