I am supposed to sort an array in ascending order..I have tried but then i cant get the results i want.I also tried to look it up in this forum but i still can't get it...Here is part of the code:
void sort()
{
int size=10;
int j,temp,i;
for(i=0;i<(size-1);i++)
{
for(j=i+1;j<size;j++)
{
if(queue[i]>queue[j])
{
temp=queue[i];
queue[i]=queue[j];
queue[j]=temp;
}
}
}
cout<<"Status: sorting done."<<endl;
}
The result i getting is zero for everything...Please help me..