all tasks
This commit is contained in:
parent
b83f433714
commit
68f8f3e56b
14735 changed files with 178959 additions and 0 deletions
|
|
@ -0,0 +1,24 @@
|
|||
Dim a(11): ordered=false
|
||||
print "Original set"
|
||||
For n = 0 to 9
|
||||
a[n]=int(rand*20+1)
|
||||
print a[n]+", ";
|
||||
next n
|
||||
#algorithm
|
||||
while ordered=false
|
||||
ordered=true
|
||||
For n = 0 to 9
|
||||
if a[n]> a[n+1] then
|
||||
x=a[n]
|
||||
a[n]=a[n+1]
|
||||
a[n+1]=x
|
||||
ordered=false
|
||||
end if
|
||||
next n
|
||||
end while
|
||||
|
||||
print
|
||||
print "Ordered set"
|
||||
For n = 1 to 10
|
||||
print a[n]+", ";
|
||||
next n
|
||||
Loading…
Add table
Add a link
Reference in a new issue