uses crt;
procedure B(x: integer);forward;
procedure A(x: integer);
begin
if (x>0) then
begin
write('Pada saat x = ',x,', prosedur A dijalankan');
B(x-1);
end;
end;
procedure B(x: integer);
begin
if (x>0) then
begin
writeln('Pada saat x = ',x,', prosedur A dijalankan');
A(x-1);
end;
end;
begin
writeln('Memanggil prosedur A:');
A(5);
writeln;
writeln('Memanggil prosedur B:');
B(5);
end.
COMMENT BOX EmoticonEmoticon