home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-385-Vol-1of3.iso / f / funnel-x.zip / examples / ex16.out < prev    next >
Text File  |  1992-05-27  |  453b  |  19 lines

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