315
Объяснение:
k=1 j=1: m=1->1 s=0+(1+1+1)=3
k=2 j=1: m=1->1 s=3+(2+1+1)=7
j=2: m=1->2 s=7+(2+2+1)+ (2+2+2)=18
k=3 j=1: m=1->1 s=18+(3+1+1)=23
j=2: m=1->2 s=23+(3+2+1)+ (3+2+2)=36
j=3: m=1->3 s=36+(3+3+1)+(3+3+2)+(3+3+3)=60
k=4 j=1: m=1->1 s=60+(4+1+1)=66
j=2: m=1->2 s=66+(4+2+1)+(4+2+2)=81
j=3: m=1->3 s=81+(4+3+1)+ (4+3+2)+(4+3+3)=108
j=4: m=1->4 s=108+(4+4+1)+(4+4+2)+(4+4+3)+(4+4+4)=150
k=5 j=1: m=1->1 s=150+(5+1+1)=157
j=2: m=1->2 s=157+(5+2+1)+(5+2+2)=174
j=3: m=1->3 s=174+(5+3+1)+(5+3+2)+(5+3+3)=204
j=4: m=1->4 s=204+(5+4+1)+(5+4+2)+(5+4+3)+(5+4+4)=250
j=5: m=1->5 s=250+(5+5+1)+(5+5+2)+(5+5+3)+(5+5+4)+(5+5+5)=315
315
Объяснение:
k=1 j=1: m=1->1 s=0+(1+1+1)=3
k=2 j=1: m=1->1 s=3+(2+1+1)=7
j=2: m=1->2 s=7+(2+2+1)+ (2+2+2)=18
k=3 j=1: m=1->1 s=18+(3+1+1)=23
j=2: m=1->2 s=23+(3+2+1)+ (3+2+2)=36
j=3: m=1->3 s=36+(3+3+1)+(3+3+2)+(3+3+3)=60
k=4 j=1: m=1->1 s=60+(4+1+1)=66
j=2: m=1->2 s=66+(4+2+1)+(4+2+2)=81
j=3: m=1->3 s=81+(4+3+1)+ (4+3+2)+(4+3+3)=108
j=4: m=1->4 s=108+(4+4+1)+(4+4+2)+(4+4+3)+(4+4+4)=150
k=5 j=1: m=1->1 s=150+(5+1+1)=157
j=2: m=1->2 s=157+(5+2+1)+(5+2+2)=174
j=3: m=1->3 s=174+(5+3+1)+(5+3+2)+(5+3+3)=204
j=4: m=1->4 s=204+(5+4+1)+(5+4+2)+(5+4+3)+(5+4+4)=250
j=5: m=1->5 s=250+(5+5+1)+(5+5+2)+(5+5+3)+(5+5+4)+(5+5+5)=315
namespace Culsy{ public partial class Form1 : Form { public Form1() { InitializeComponent(); }
float a, b,z; int count; string znak = ""; int slo, vich, umn, del; private void Form1_Load(object sender, EventArgs e) {
}
private void button1_Click(object sender, EventArgs e) { textBox1.Text = textBox1.Text + 1; }
private void button2_Click(object sender, EventArgs e) { textBox1.Text = textBox1.Text + 2; }
private void button3_Click(object sender, EventArgs e) { textBox1.Text = textBox1.Text + 3; }
private void button4_Click(object sender, EventArgs e) { textBox1.Text = textBox1.Text + 4; }
private void button5_Click(object sender, EventArgs e) { textBox1.Text = textBox1.Text + 5; }
private void button6_Click(object sender, EventArgs e) { textBox1.Text = textBox1.Text + 6; }
private void button7_Click(object sender, EventArgs e) { textBox1.Text = textBox1.Text + 7; }
private void button8_Click(object sender, EventArgs e) { textBox1.Text = textBox1.Text + 8; }
private void button9_Click(object sender, EventArgs e) { textBox1.Text = textBox1.Text + 9; }
private void button10_Click(object sender, EventArgs e) { textBox1.Text = textBox1.Text + 0; }
private void button11_Click(object sender, EventArgs e) { textBox1.Text = textBox1.Text + ","; }
private void button12_Click(object sender, EventArgs e) { a = float.Parse(textBox1.Text); textBox1.Clear(); slo = 1; znak = " + "; }
private void button13_Click(object sender, EventArgs e) { a = float.Parse(textBox1.Text); textBox1.Clear(); vich = 1; znak = " - "; }
private void button14_Click(object sender, EventArgs e) { a = float.Parse(textBox1.Text); textBox1.Clear(); umn = 1; znak = " * ";
}
private void button15_Click(object sender, EventArgs e) { a = float.Parse(textBox1.Text); textBox1.Clear(); del = 1; znak = " / "; }
private void button16_Click(object sender, EventArgs e) { b = float.Parse(textBox1.Text); if (slo == 1) { z = a + b; } if (vich == 1) { z = a - b; } if (umn == 1) { z = a * b; } if (del == 1) { if (b == 0) { z = a / b; } else { textBox1.Text = "Деление на 0"; } }
textBox1.Text = a.ToString() + znak + b.ToString() + " = " + z.ToString(); }
}}Упрощено для надежной работы