I can't get this program to compile because it doesn't seem to print integer variables along with strings in the Put_Line method. I've looked at source code online and it works when they do it so where am I going wrong. Thanks for your help.
with Ada.Text_IO; use Ada.Text_IO;
with Ada.Integer_Text_IO; use Ada.Integer_Text_IO;
procedure MultiplicationTable is
procedure Print_Multiplication_Table(Number :in Integer; Multiple :in Integer) is
Result : Integer;
begin
for Count in 1 ..Multiple
loop
Result := Number * Count;
Put_Line(Number & " x " & Count & " = " & Result);
end loop;
end Print_Multiplication_Table;
Number : Integer;
Multiple : Integer;
begin
Put("Display the multiplication of number: ");
Get(Number);
Put("Display Multiplication until number: ");
Get(Multiple);
Print_Multiplication_Table(Number,Multiple);
end MultiplicationTable;`
New_Line(1);
rather than justNew_Line;
? – Mantelletta