SubclickSound.PlayClick()IfControls.LastClickedButton=key0ThenControls.SetTextBoxText(t,Text.Append(Controls.GetTextBoxText(t),"0"))ElseIfControls.LastClickedButton=key1ThenControls.SetTextBoxText(t,Text.Append(Controls.GetTextBoxText(t),"1"))ElseIfControls.LastClickedButton=key2ThenControls.SetTextBoxText(t,Text.Append(Controls.GetTextBoxText(t),"2"))ElseIfControls.LastClickedButton=key3ThenControls.SetTextBoxText(t,Text.Append(Controls.GetTextBoxText(t),"3"))ElseIfControls.LastClickedButton=key4ThenControls.SetTextBoxText(t,Text.Append(Controls.GetTextBoxText(t),"4"))ElseIfControls.LastClickedButton=key5ThenControls.SetTextBoxText(t,Text.Append(Controls.GetTextBoxText(t),"5"))ElseIfControls.LastClickedButton=key6ThenControls.SetTextBoxText(t,Text.Append(Controls.GetTextBoxText(t),"6"))ElseIfControls.LastClickedButton=key7ThenControls.SetTextBoxText(t,Text.Append(Controls.GetTextBoxText(t),"7"))ElseIfControls.LastClickedButton=key8ThenControls.SetTextBoxText(t,Text.Append(Controls.GetTextBoxText(t),"8"))ElseIfControls.LastClickedButton=key9ThenControls.SetTextBoxText(t,Text.Append(Controls.GetTextBoxText(t),"9"))ElseIfControls.LastClickedButton=keytochkaThenControls.SetTextBoxText(t,Text.Append(Controls.GetTextBoxText(t),"."))ElseIfControls.LastClickedButton=keyplusminusThenIfp=0ThenControls.SetTextBoxText(t,Text.Append("-",Controls.GetTextBoxText(t)))p=1ElseControls.SetTextBoxText(t,Math.Abs(Controls.GetTextBoxText(t)))p=0EndIfElseIfControls.LastClickedButton=keyplusThena=Controls.GetTextBoxText(t)Controls.SetTextBoxText(t,"")знак="+"ElseIfControls.LastClickedButton=keyminusThena=Controls.GetTextBoxText(t)Controls.SetTextBoxText(t,"")знак="-"ElseIfControls.LastClickedButton=keyumnogenieThena=Controls.GetTextBoxText(t)Controls.SetTextBoxText(t,"")знак="*"ElseIfControls.LastClickedButton=keydelenieThena=Controls.GetTextBoxText(t)Controls.SetTextBoxText(t,"")знак="/"ElseIfControls.LastClickedButton=keysqrtThenControls.SetTextBoxText(t,Math.SquareRoot(Controls.GetTextBoxText(t)))ElseIfControls.LastClickedButton=keynaxThenControls.SetTextBoxText(t,1/Controls.GetTextBoxText(t))ElseIfControls.LastClickedButton=keyCThena=""b=""Controls.SetTextBoxText(t,"")ElseIfControls.LastClickedButton=keyCEThenControls.SetTextBoxText(t,"")ElseIfControls.LastClickedButton=keyBackspaseThenControls.SetTextBoxText(t,Text.GetSubText(Controls.GetTextBoxText(t),1,Text.GetLength(Controls.GetTextBoxText(t))-1))ElseIfControls.LastClickedButton=keyMPOrControls.LastClickedButton=keyMSThenc=Controls.GetTextBoxText(t)Shapes.ShowShape(m)ElseIfControls.LastClickedButton=keyMCThenc=""Shapes.HideShape(m)ElseIfControls.LastClickedButton=keyMRThenControls.SetTextBoxText(t,c)ElseIfControls.LastClickedButton=keyprocentThenControls.SetTextBoxText(t,(a*Controls.GetTextBoxText(t))/100)ElseIfControls.LastClickedButton=keyravnoThenb=Controls.GetTextBoxText(t)Ifзнак="+"ThenControls.SetTextBoxText(t,a+b)ElseIfзнак="-"ThenControls.SetTextBoxText(t,a-b)ElseIfзнак="*"ThenControls.SetTextBoxText(t,a*b)ElseIfзнак="/"ThenIfb=0ThenControls.SetTextBoxText(t,"Divide by zero is impossible!")ElseControls.SetTextBoxText(t,a/b)EndIfEndIfEndIfEndSub