help sort method of the burboja

Get help using Construct 2

Post » Tue May 01, 2012 7:43 pm

Hello Scirra people, excuse me my English is not very good.

I would like to help me, I make the bubble sort method but not how to C2 or CC.
help me.


for(i=0; i < n-1; i++){                            
   for(j=0; j < n-1; j++){                   
        if(vec[j] > vec[j+1]){              
                      aux=vec[j];                  
                      vec[j]=vec[j+1];            
                        vec[j+1]=aux;}
              }
          }
B
9
S
3
G
5
Posts: 3
Reputation: 3,405

Post » Tue May 01, 2012 9:12 pm

Here is an implementation for C2:
http://www.scirra.com/forum/sorting-an-array_topic49771_post313341.html#313341

Also if you get the latest beta R87 you can just use the sort action for the array object.
B
79
S
24
G
54
Posts: 4,749
Reputation: 40,761

Post » Thu May 03, 2012 7:13 pm

thank you very much....
B
9
S
3
G
5
Posts: 3
Reputation: 3,405


Return to How do I....?

Who is online

Users browsing this forum: Google [Bot] and 21 guests