注意:此页面搜索的是所有试题
题目内容
(国家开放大学Delphi程序设计)
阅读下面的程序段,其中edit1~edit3均为编辑框组件,当 s 为 3 ,edit1输入数字9 , edit2输入数字3的时候,执行下面的程序段,请选择edit3应显示的内容为。
var
x,y,z,s :integer;
begin
x:= strtoint(edit1.Text);
y:= strtoint(edit2.Text);
case s of
0: z:= x+y ;
1: z:= x-y ;
2: z:= x*y ;
3: z:= x div y;
end;
edit3.text:=inttostr(z);
if s=3 then
if (x mod y<>0)then
edit3.text:=Edit3.text+. --- .+ inttostr(x mod y) ;
end;
执行后,edit3显示的内容为:
A、3
B、2
C、1
D、0
var
x,y,z,s :integer;
begin
x:= strtoint(edit1.Text);
y:= strtoint(edit2.Text);
case s of
0: z:= x+y ;
1: z:= x-y ;
2: z:= x*y ;
3: z:= x div y;
end;
edit3.text:=inttostr(z);
if s=3 then
if (x mod y<>0)then
edit3.text:=Edit3.text+. --- .+ inttostr(x mod y) ;
end;
执行后,edit3显示的内容为:
A、3
B、2
C、1
D、0
参考答案

