, Visual C#


- 2


i=4;

Number = Convert.ToDouble(textBox1.Text);

textBox1.Text = "";

textBox1.Focus();

= (. 11.1) , , :

if (i==4)

{

number2 = Convert.ToDouble(textBox1.Text);

number3 = Number / number2;

textBox1.Text = number3.ToString();

}

1/x 1/x (. 11.1). 1/x, 1/x (. 11.1) :

double number2;

Number = Convert.ToDouble(textBox1.Text);

number2 = 1/Number;

textBox1.Text = number2.ToString();

, % (. 11.1) :

double number2, number3;

if (i==1)

{

number2 = Convert.ToDouble(textBox1.Text);

number3 = Number*(1 + number2/100);

textBox1.Text = number3.ToString();

}

if (i==2)

{

number2 = Convert.ToDouble(textBox1.Text);

number3 = Number*(1 - number2/100);

textBox1.Text = number3.ToString();

}

if (i==3)

{

number2 = Convert.ToDouble(textBox1.Text);

number3 = Number*number2/100;

textBox1.Text = number3.ToString();

}

if (i==4)

{

number2 = Convert.ToDouble(textBox1.Text);

number3 = Number/number2*100;

textBox1.Text = number3.ToString();

}

, Windows . .

C (. 11.1) :