pascal程序,为什么运行不出结果
程序:programSZE;vari,c,b:integer;x:array[1..100]ofinteger;beginwrite('NUM=');readln(c);...
程序:
program SZE;
var
i,c,b:integer;
x:array[1..100]of integer;
begin
write('NUM=');
readln(c);
i:=0;
while C=0 do
begin
inc(i);
x[i]:=c mod 2;
c:=c div 2;
end;
b:=i;
for i:=b downto 1 do
write(x[i]);
readln
end. 展开
program SZE;
var
i,c,b:integer;
x:array[1..100]of integer;
begin
write('NUM=');
readln(c);
i:=0;
while C=0 do
begin
inc(i);
x[i]:=c mod 2;
c:=c div 2;
end;
b:=i;
for i:=b downto 1 do
write(x[i]);
readln
end. 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询