CDE
This commit is contained in:
parent
518da4a923
commit
764da6cbbb
6144 changed files with 83610 additions and 11 deletions
18
Task/Euler-method/Ada/euler-method-3.ada
Normal file
18
Task/Euler-method/Ada/euler-method-3.ada
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
with Ada.Text_IO; use Ada.Text_IO;
|
||||
with Euler;
|
||||
|
||||
procedure Test_Euler_Method is
|
||||
package Float_Euler is new Euler (Float);
|
||||
use Float_Euler;
|
||||
|
||||
function Newton_Cooling_Law (T, Y : Float) return Float is
|
||||
begin
|
||||
return -0.07 * (Y - 20.0);
|
||||
end Newton_Cooling_Law;
|
||||
|
||||
Y : Waveform := Solve (Newton_Cooling_Law'Access, 100.0, 0.0, 100.0, 10);
|
||||
begin
|
||||
for I in Y'Range loop
|
||||
Put_Line (Integer'Image (10 * I) & ":" & Float'Image (Y (I)));
|
||||
end loop;
|
||||
end Test_Euler_Method;
|
||||
Loading…
Add table
Add a link
Reference in a new issue