blob: a3b510afd9c041b6f45698f83e5ce035f03df55c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
with text_io; use text_io;
procedure example is
n : constant natural := 10; -- How many numbers? (Ans: [1,n]).
p : constant natural := 5; -- How many powers? (Ans: [1,p]).
begin -- example
for i in 1..n loop
declare
ip : natural := 1;
begin
for power in 1..p loop
ip:=ip*i;
put(natural'image(ip) & " ");
end loop;
new_line;
end;
end loop;
end example;
|