Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {Винарский}
- program z_12_30(input,output);
- function g(m: integer): integer; forward;
- function f(n: integer): integer;
- begin
- if(n=0) then f:=1
- else f:=n+g(n-1);
- end;
- function g(m: integer): integer;
- begin
- if(m=0) then g:=1
- else g:=f(m-1)+(m-1);
- end;
- begin
- end.
Advertisement
Add Comment
Please, Sign In to add comment