fork download
  1. Program recursionTest (input,output);
  2. Var
  3. x,y : integer;
  4.  
  5. function gcd (a, b: integer) : result real;
  6. var x : integer;
  7. begin
  8. if b= 0 then gcd := a
  9. else begin
  10. x := a;
  11. while (x >= b) do
  12. begin
  13. x := x - b
  14. end;
  15. gcd := gcd(b,x)
  16. end
  17. end
  18. begin
  19. read (x,y);
  20. if x>y then write (gcd(x, y))
  21. end.
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.pas:5: error: unknown identifier `result'
prog.pas:5: error: syntax error before `real'
stdout
Standard output is empty