Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var x1,y1,x2,y2,x3,y3,i,n,s:longint;
- begin
- readln(n);
- readln(x1,y1);
- readln(x2,y2);
- for i:=3 to n do
- begin
- readln(x3,y3);
- s:=s+((x3-x2)*(y1-y2))-((x1-x2)*(y3-y2));
- x1:=x2;y1:=y2;
- x2:=x3;y2:=y3;
- end;
- if s>0 then write('ccw') else write('cw');
- end.
Add Comment
Please, Sign In to add comment