fork(1) download
  1. (* Решение задачи "Координатные четверти" - Алексей Филатов, 10 класс *)
  2.  
  3. program ideone;
  4. begin
  5. program p1;
  6.  
  7. var
  8. input, output: text;
  9. x1, y1, x2, y2, c1, c2: integer;
  10.  
  11. begin
  12. assign(input, 'input.txt');
  13. reset(input);
  14. assign(output, 'output.txt');
  15. rewrite(output);
  16. readln(input, x1);
  17. readln(input, y1);
  18. readln(input, x2);
  19. readln(input, y2);
  20. if (x1 > 0) and (y1 > 0) then c1 := 1;
  21. if (x1 < 0) and (y1 > 0) then c1 := 2;
  22. if (x1 < 0) and (y1 < 0) then c1 := 3;
  23. if (x1 > 0) and (y1 < 0) then c1 := 4;
  24. if (x2 > 0) and (y2 > 0) then c2 := 1;
  25. if (x2 < 0) and (y2 > 0) then c2 := 2;
  26. if (x2 < 0) and (y2 < 0) then c2 := 3;
  27. if (x2 > 0) and (y2 < 0) then c2 := 4;
  28. if c1 = c2 then write(output, 'YES')
  29. else write(output, 'NO');
  30. close(input);
  31. close(output);
  32. end.
  33.  
  34. end.
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Free Pascal Compiler version 2.6.4+dfsg-4 [2014/10/14] for i386
Copyright (c) 1993-2014 by Florian Klaempfl and others
Target OS: Linux for i386
Compiling prog.pas
prog.pas(5,2) Error: Illegal expression
prog.pas(5,10) Fatal: Syntax error, ";" expected but "identifier P1" found
Fatal: Compilation aborted
Error: /usr/bin/ppc386 returned an error exitcode (normal if you did not specify a source file to be compiled)
stdout
Standard output is empty