Canon/open_set/06_func_defn.pas

18 lines
175 B
ObjectPascal
Raw Normal View History

2024-03-09 20:11:27 +08:00
program main;
var
a: integer;
b: integer;
function func(p: integer): integer;
begin
p := p - 1;
func := p;
end;
begin
a := 10;
b := func(a);
write(b);
end.