Website and domain for sale: mail@discussmain.com

Napishite, please, it passes the program according to which in pascal animation of the intersection on which two cars, one of which stops on the traffic light and when green light lights up, pass will be removed further. URGENTLY!!!

103
PascalABC 3 code. 0 uses GraphABC, Crt; Var x, y, t, v1, v2: integer; C: word; Begin Write (Enter operating time of the traffic light:); ReadLn(t); Write (Enter the speed of the green car:); ReadLn (v1); Write (Enter the speed of the red car:); ReadLn (v2); LockDrawing; Repeat ClearWindow; Case (C div t) mod 3 of 0: SetBrushColor(clGreen); 1: SetBrushColor(clYellow); 2: SetBrushColor(clRed); End; Circle (-30+ (WindowWidth div 2),-40+ (WindowHeight div 2), 10); Case (C div t) mod 3 of 2: SetBrushColor(clGreen); 1: SetBrushColor(clYellow); 0: SetBrushColor(clRed); End; Circle (-40+ (WindowWidth div 2), 30+ (WindowHeight div 2), 10); if C< 65535 then C: = else C C+1: = 0; SetBrushColor(clMedGray); FillRect (0.20+ (WindowHeight div 2), WindowWidth,-20+ (WindowHeight div 2)); FillRect (20+ (WindowWidth div 2), 0,-20+ (WindowWidth div 2), WindowHeight); SetBrushColor(clGreen); FillRect (-13+ (WindowWidth div 2), - 40+y, 13+ (WindowWidth div 2), y); if ((x+v1< = (WindowWidth div 2)-20) or (x-40> = (WindowWidth div 2) +20)) then x: = x+v1 else Begin if ((y-40> = 20+ (WindowHeight div 2)) or (y< = (WindowHeight div 2)-20)) then Begin if ((C div t) of mod 3 = 2) or (x> (WindowWidth div 2)-20) then x: = x+v1 End End; if x> = WindowWidth+40 then x: = 0; SetBrushColor(clRed); FillRect (-40+x, 13+ (WindowHeight div 2), x,-13+ (WindowHeight div 2)); if (y+v2< = (WindowHeight div 2)-20) or (y-40> = (WindowHeight div 2) +20) then y: = y+v2 else Begin if (x-40> = 20+ (WindowWidth div 2)) or (x< = (WindowWidth div 2)-20) then Begin if ((C div t) of mod 3 = 0) or (y> (WindowHeight div 2)-20) then y: = y+v2 End End; if y> = WindowHeight+40 then y: = 0; Redraw Until false; End.
183
Answer add