A-M baby
This commit is contained in:
parent
764da6cbbb
commit
db842d013d
19005 changed files with 197040 additions and 7 deletions
25
Task/Multiplication-tables/Ada/multiplication-tables.ada
Normal file
25
Task/Multiplication-tables/Ada/multiplication-tables.ada
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
with Ada.Text_IO; use Ada.Text_IO;
|
||||
with Ada.Strings.Fixed; use Ada.Strings.Fixed;
|
||||
procedure Multiplication_Table is
|
||||
package IO is new Integer_IO (Integer);
|
||||
use IO;
|
||||
begin
|
||||
Put (" | ");
|
||||
for Row in 1..12 loop
|
||||
Put (Row, Width => 4);
|
||||
end loop;
|
||||
New_Line;
|
||||
Put_Line ("--+-" & 12 * 4 * '-');
|
||||
for Row in 1..12 loop
|
||||
Put (Row, Width => 2);
|
||||
Put ("| ");
|
||||
for Column in 1..12 loop
|
||||
if Column < Row then
|
||||
Put (" ");
|
||||
else
|
||||
Put (Row * Column, Width => 4);
|
||||
end if;
|
||||
end loop;
|
||||
New_Line;
|
||||
end loop;
|
||||
end Multiplication_Table;
|
||||
Loading…
Add table
Add a link
Reference in a new issue