正在加载图片...
511函数的定义与使用(5) ③双击“比较”按钮,在自动生成的 TOn1. Button1Cick()过程中添加变 量定乂语句和事件处理语句 procedure TForm1. Button 1Click(Sender: TObject) var a, b c real begin 比较三个数的大小 输入三个实数 a:=strtofloat(edit1 text) b =strtofloat(edita. text) C:=strtofloat(edit3 text) 三个数中的最大值是 edit4. text: =floattostr(max(max(a, b), c)) end 图5-1比较三个数的大小 ③双击“比较”按钮,在自动生成的 TForm1. Button 1click()过程中添加 变量定义语句和事件处理语句 procedure TForm1.Button 1Click ( Sender: TObject) var a b c real Inprise Dephi5.1.1 函数的定义与使用(5)  双击“比较”按钮,在自动生成的TForm1.Button1Click()过程中添加变 量定义语句和事件处理语句。 procedure TForm1.Button1Click(Sender: TObject); var a,b,c:real; begin a:=strtofloat(edit1.text); b:=strtofloat(edit2.text); c:=strtofloat(edit3.text); edit4.text:=floattostr(max(max(a,b),c)); end; 图5-1 比较三个数的大小  双击“比较”按钮,在自动生成的TForm1.Button1Click()过程中添加 变量定义语句和事件处理语句。 procedure TForm1.Button1Click(Sender: TObject); var a,b,c:real;
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有