fork download
  1. program P;
  2. var a,b:integer;
  3. function f(a:integer;var b:integer):integer;
  4. begin
  5. if a>0 then f:=f(a-1,b-1)+2
  6. else if b<0 then f:=f(a,b+1) -1
  7. else f:=b;
  8. end;
  9. begin
  10. a:=5; b:=2;
  11. writeln(f(a,b))
  12. end.
  13.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.pas: In function `f':
prog.pas:5: error: reference expected, value given in argument 2
prog.pas:3: error:  routine declaration
prog.pas:6: error: reference expected, value given in argument 2
prog.pas:3: error:  routine declaration
stdout
Standard output is empty