Guest User

Untitled

a guest
Aug 11th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 0.26 KB | None | 0 0
  1. var x1,y1,x2,y2,x3,y3,i,n,s:longint;
  2. begin
  3. readln(n);
  4. readln(x1,y1);
  5. readln(x2,y2);
  6. for i:=3 to n do
  7.  begin
  8.   readln(x3,y3);
  9.    s:=s+((x3-x2)*(y1-y2))-((x1-x2)*(y3-y2));
  10.   x1:=x2;y1:=y2;
  11.   x2:=x3;y2:=y3;
  12.  end;
  13. if s>0 then write('ccw') else write('cw');
  14. end.
Add Comment
Please, Sign In to add comment