Kafedrasi fanidan Laboratoriya ishi


Download 238.17 Kb.
Sana13.01.2022
Hajmi238.17 Kb.
#329581
algoratim
Bog'liq
Boshqaruv tamoyillari, Мухим е'лон, Мухим е'лон, #56, 16-Metall kesish stanоklari tasnifi., Behzod, nasiba, 4-Amaliy ish, 4-Amaliy ish, e, 7-sinf matematika 25 talik test 1-variant, Tavsiya Xalq og'zaki ijodida mehnatsevarlik tarbiyasi ., Tavsiya Xalq og'zaki ijodida mehnatsevarlik tarbiyasi ., 17 Dasturlash Akbar Absamatov 019-110, Mustaqil talim (2) 54d888cc20a0a662e80d4c92d947940f

O‘ZBEKISTON RESPUBLIKASI AXBOROT TEXNOLOGIYALARI VA KOMMUNIKATSIYALARINI RIVOJLANTIRISH VAZIRLIGI

MUHAMMAD AL-XORAZMIY NOMIDAGI TOSHKENT AXBOROT TEXNOLOGIYALARI UNIVERSITETI

________________ kafedrasi

_________________ fanidan

Laboratoriya ishi

MAVZU:__________________________________________________

______________________________________.

Bajardi:_____ guruh talabasi

_______________________

Tekshirdi: _______________

Toshkent 2021

KVADRAT TENGLAMA



1.Login oynasini hosil qilish.



using System;

using System.Collections.Generic;

using System.ComponentModel;

using System.Data;

using System.Drawing;

using System.Linq;

using System.Text;

using System.Threading.Tasks;

using System.Windows.Forms;
namespace MainProject

{

public partial class login : Form

{

public login()

{

InitializeComponent();

}
private void button2_Click(object sender, EventArgs e)

{
string login = "sherzod";

int password = 0064;

string login1 = txtlog.Text;

int password1 = Convert.ToInt32(txtpass.Text);

if (login == login1)

{

if (password == password1)

{

mainform mn = new mainform();

mn.Show();

this.Hide();

}

else

{

MessageBox.Show("Parol xato kiritildi");

}
}

else

{

MessageBox.Show("Login xato kiritildi");

}

}

}

}
2. Kvadrat Tenglama oynasini hosil qilish.



using System;

using System.Collections.Generic;

using System.ComponentModel;

using System.Data;

using System.Drawing;

using System.Linq;

using System.Text;

using System.Threading.Tasks;

using System.Windows.Forms;
namespace MainProject

{

public partial class mainform : Form

{

public mainform()

{

InitializeComponent();

}

private void textBox5_TextChanged(object sender, EventArgs e)

{
}
private void button2_Click(object sender, EventArgs e)

{



double a = Convert.ToDouble(textBox1.Text);

double b = Convert.ToDouble(textBox2.Text);

double c = Convert.ToDouble(textBox3.Text);

double D = (b * b - 4 * a * c);

double x1, x2;

if (D < 0)

{

MessageBox.Show("Yechim yoq, D < 0");

}

else if (D == 0)

{

x1 = (-1 * b) / (2 * a);

MessageBox.Show("D = 0, x1= "+x1+".");



}

else if (D > 0)

{

x1 = (-1 * b + Math.Sqrt(D)) / (2 * a);

x2 = (-1 * b - Math.Sqrt(D)) / (2 * a);

MessageBox.Show("D > 0, x1 = " +x1+ ", x2= "+x2);

}

}
private void mainform_Load(object sender, EventArgs e)

{
}

}

}
Download 238.17 Kb.

Do'stlaringiz bilan baham:




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2022
ma'muriyatiga murojaat qiling