Код в Turbo Pascal: USES Graph,CRT; VAR x,y,dx,dy,Device,Mode,i: Integer; BEGIN Device:=0; InitGraph(Device,Mode,''); x:=10; y:=10; dx:=1; dy:=1; i:=1; Repeat SetColor(Cyan); Circle(x,y,10); SetFillStyle(1,3); FloodFill(x,y,Cyan); Delay(10); SetColor(Black); Circle(x,y,10); SetFillStyle(1,0); FloodFill(x,y,Black); x:=x+dx; y:=y+dy; if (x>300) OR (y>200) then begin x:=10; y:=10; i:=i+1; end;
until i>5; END.
stolle16
16.10.2022
Class ArrayEven{ public static void main(String args[]){ java.util.Scanner in = new java.util.Scanner(System.in); long eArray[] = new long[1]; while((eArray[eArray.length-1] = in.nextLong())!=-1){ long nArray[] = new long[eArray.length+1]; for(int nCell = 0; nCell<eArray.length; nCell++)nArray[nCell]=eArray[nCell]; eArray = nArray; } eArrayCell: for(int cCell = 0; cCell<eArray.length-1; cCell++){ if(eArray[cCell]%2==1)continue; else for(int eCell = cCell+1; eCell<eArray.length-1; eCell++) if(eArray[eCell]%2==1){ eArray[eArray.length-1]=eArray[cCell]; eArray[cCell]=eArray[eCell]; eArray[eCell]=eArray[eArray.length-1]; continue eArrayCell; } break; } for(int cCell = 0; cCell<eArray.length-1; cCell++)System.out.print(eArray[cCell]+" "); } }
USES Graph,CRT;
VAR x,y,dx,dy,Device,Mode,i: Integer;
BEGIN
Device:=0;
InitGraph(Device,Mode,'');
x:=10; y:=10;
dx:=1; dy:=1;
i:=1;
Repeat
SetColor(Cyan);
Circle(x,y,10);
SetFillStyle(1,3);
FloodFill(x,y,Cyan);
Delay(10);
SetColor(Black);
Circle(x,y,10);
SetFillStyle(1,0);
FloodFill(x,y,Black);
x:=x+dx; y:=y+dy;
if (x>300) OR (y>200) then
begin
x:=10;
y:=10;
i:=i+1;
end;
until i>5;
END.