Help Please!

Hi, i have got Quicksort algorithm code, but it has got many mistake. I can't fix it. Please help me

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#include<iostream>
#include<math.h>  
#include<stdlib.h>
using namespace std;

void c_ara(int x[]);
int n; 
int break_pt; 
int main()
{
    int dizi[x]={21,33,441,512,662,1,4,3212,521,55216};
     if (n==2)
     if x[0]>x[1])
     yerles2(x[0],x[1]);}
     else //
     {
         if(n>2)
         {break_pt=ayir(x,n);
         c_ara(x,);
         c_ara(x[break_pt+1],n-break_pt-1;} 
         }
        return; 
         }
         int ayir(int y[],int m) 
         {
             int k1(1),k2(1),count(0),pivot; 
             pivot=y[0];
             while ((k1<m)&&(k2<m)) ;
             {
                   while ((k1<m)&&(y[k1]>pivot))
                   
                   k1++; 
                   while ((k2<m)&&(y[k2]>pivot)) 
                   k2++;
                   if(k1<m)&&(k2<m) 
                   {yerles2(y[k1],y[k2]; 
                   count++;} 
                   }
                   if (count>0)
                   yerles2(y[0],y[count];
                   else
                   {
                       k1=0; 
                       while ((k1<m-1)&&(y[k1]>y[k1+1]))
                       {yerles2(y[k1],y[k1+1]; 
                       k1++;} 
                       count=k1; 
                       return count;
                       }
Last edited on
can anybody help me? this is realy important for me
closed account (iN6qM4Gy)
What is this code supposed to do?

I can't fix it without really understanding what it does. Also, there are so many missing things. But a main one is probably that dizi[x] isn't something that is possible to declare, especially without x being anything. try at the very least changing that x to a 10.

Last edited on
this prog. aim is array from min value to max value. I must do this prog. with void, if you fix this prog. i would be grateful.
help me please!!!
up!
Topic archived. No new replies allowed.