我无法编译该程序,因为它似乎没有在 Put_Line 方法中打印整数变量和字符串。我在网上查看了源代码,当他们这样做时它就可以工作,所以我哪里出错了。谢谢你的帮助。
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;`