with Ada.Text_IO; with Ada.Integer_Text_IO; with Ada.Float_Text_IO; with Ada.Command_Line; with Ada.Strings; with Ada.Strings.Unbounded; procedure program is package to renames Ada.Text_IO; package io renames Ada.Integer_Text_IO; package fo renames Ada.Float_Text_IO; package s renames Ada.Strings; package su renames Ada.Strings.Unbounded; package cl renames Ada.Command_Line; type Degrees is new Float range -273.15 .. Float'Last; Temperature: Degrees; begin declare X: su.Unbounded_String := su.To_Unbounded_String(cl.Argument(1)); begin Temperature := 36.6; to.Put("Hello, World!!!. The temperature is: "); fo.Put(Float(Temperature), EXP => 0, AFT => 2); to.New_Line; if Temperature >= 40.0 then to.Put_Line("Wow!"); to.Put_Line("It's extremly hot"); elsif Temperature >= 30.0 then to.Put_Line("It's hot"); elsif Temperature >= 20.0 then to.Put_Line("It's warm"); elsif Temperature >= 10.0 then to.Put_Line("It's cool"); elsif Temperature >= 0.0 then to.Put_Line("It's cold"); else to.Put_Line("It's freezing"); end if; to.Put("Argument 1: "); to.Put_Line(su.To_String(X)); X := su.To_Unbounded_String(cl.Argument(2)); to.Put("Argument 2: "); to.Put_Line(su.To_String(X)); end; exception when CONSTRAINT_ERROR => to.Put_Line("Niepoprawne wywołanie programu"); end program;