with Ada.Text_IO; use Ada.Text_IO;
with Ada.Integer_Text_IO; use Ada.Integer_Text_IO;
with Ada.Float_Text_IO; use Ada.Float_Text_IO;
with Ada.Numerics.Elementary_Functions; use Ada.Numerics.Elementary_Functions;
with Ada.Numerics; use Ada.Numerics;
procedure AdaO11 is
procedure Calculate_Angles (Sa, Hc, : in Float;
Va, Vb, Vc : out Float) is
begin
Va := Arcsin(Sa / Hc);
Vb := Arccos(Sa / Hc);
Vc := 90.0;
end Calculate_Angles;
procedure Angle_Program is
Hc, Sa : Integer;
Va : Float;
begin
Put("Type in the length of the hypotenuse: ");
Get(Hc);
Put("Type in the opposite catheus: ");
Get(Sa);
New_Line;
Put("Va: ");
Put(Calculate_Angles(Va));
end Angle_Program;
Selection : Integer;
begin
Put_Line("Welcome to the calculator!")
end AdaO11;
所以,我想知道为什么我在尝试计算角度时会出错。我做错什么了吗?我真的没有看到这个错误。我调用 2 个参数,然后发出 3 个。错误可能在我的代码的那部分。
任何帮助,将不胜感激。