Alice 3.3: различия между версиями

474 байта добавлено ,  3 года назад
this.alice say "X не найден"
</source>
==Сортировка выбором==
<source lang="c++">
constant DecimalNumber Arr = new DecimalNumber[] {0.25, 1.0, 2.0, 0.5, 1.0}
WholeNumber i = 0
WholeNumber j = 0
DecimalNumber X = 0.0
while (i < Arr.Length) is true
{
j = i + 1
while (j < Arr.Length) is true
{
if (A[i] < A[j]) is true then
{
C = A[i]
A[i] = A[j]
A[j] = C
}
j = j + 1
}
i = i + 1
}
for each (DecimalNumber n) in A
this.alice say "n:" + n
</source>
 
 
 
<!--
=Сортировки=