Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
18
Task/Loops-Break/Ada/loops-break.ada
Normal file
18
Task/Loops-Break/Ada/loops-break.ada
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
with Ada.Text_IO; use Ada.Text_IO;
|
||||
with Ada.Numerics.Discrete_Random;
|
||||
|
||||
procedure Test_Loop_Break is
|
||||
type Value_Type is range 0..19;
|
||||
package Random_Values is new Ada.Numerics.Discrete_Random (Value_Type);
|
||||
use Random_Values;
|
||||
Dice : Generator;
|
||||
A, B : Value_Type;
|
||||
begin
|
||||
loop
|
||||
A := Random (Dice);
|
||||
Put_Line (Value_Type'Image (A));
|
||||
exit when A = 10;
|
||||
B := Random (Dice);
|
||||
Put_Line (Value_Type'Image (B));
|
||||
end loop;
|
||||
end Test_Loop_Break;
|
||||
Loading…
Add table
Add a link
Reference in a new issue