Shell Sort by yuri_dragon 172nd Feb 2008 12:23
|
---|
Summary A basic shell sort program. Description A basic shell sort program. Code ` This code was downloaded from The Game Creators ` It is reproduced here with full permission ` http://www.thegamecreators.com dim a(10) start: sa=0 randomize timer() sync rate 0 for d=1 to 10 s=rnd(10) a(d)=s next d do for w=1 to 10 print a(w);","; next w print for d=1 to 9 if a(d)>a(d+1) sa=a(d+1) a(d+1)=a(d) a(d)=sa endif next d if spacekey()=1 then goto start wait 1000 cls loop |