arkadaslar basit bir akım gerilim direnç hesaplama projesi yazıyorum fakat direnç akım grince sorun oluyor istenilen değeri vermiyor akım gerilim yazınca direnci veriyor
Kod:
private **** button1_Click(object sender, EventArgs e)
{
try
{
akm = double.Parse(textBox1.Text);
grlm = double.Parse(textBox2.Text);
drnc = double.Parse(textBox3.Text);
}
catch
{ }
if (textBox1.Text.Length >= 1 && textBox2.Text.Length >= 1 )
textBox3.Text = (grlm / akm).ToString();
else if (textBox3.Text.Length >= 1 && textBox2.Text.Length >= 1 )
textBox1.Text = (grlm / drnc).ToString();
else if (textBox1.Text.Length >= 1 && textBox3.Text.Length >= 1 )
textBox2.Text = (akm * drnc).ToString();