//Pascal
var a,s:integer;
begin
s:=0;
repeat
readln(a);
s:=s+a;
until a=0;
writeln(s);
end.
Ответ:
00111 из двоичной СС в десятичную СС будерт равен 7
Объяснение:
Номер называется "Скан-код"
Uses GraphABC;
begin
Window.Height:=600;
Window.Width:=800;
var y:=10;
while y<Window.Height do begin
Line(10,y,790,y);
y+=10
end;
var x:=10;
while x<Window.Width do begin
Line(x,10,x,590);
x+=10
end;
Randomize;
Pen.Color:=clRed;
Pen.Width:=3;
x:=Window.Width div 2;
x:=10*Round(x/10);
y:=Window.Height div 2;
y:=10*Round(y/10);
MoveTo(x,y);
repeat
case Random(1,4) of
1:LineTo(PenX+10,PenY);
2:LineTo(PenX,PenY-10);
3:LineTo(PenX-10,PenY);
4:LineTo(PenX,PenY+10);
end;
Sleep(100);
until false;
end.
Схема в приложенной картинке.