Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- with Ada.Integer_Text_IO;
- use Ada.Integer_Text_IO;
- with Ada.Text_IO;
- use Ada.Text_IO;
- procedure recursion is
- function rec (N : Natural) return Natural is
- begin
- Put_Line (Integer'Image (N));
- if N = 1 then
- return 1;
- else
- return rec (N - 1);
- end if;
- end rec;
- N : Integer;
- begin
- rec (10);
- end recursion;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement