title: Bubble sort not working properly
body: <pre><code>do
  {
      swap=false;
      for(int i=0; i&lt;256; i++)
      {
      if(pd[i]&lt;pd[i+1])
      {
          int temp=pd[i];
              pd[i]=pd[i+1];
              pd[i+1]=temp;
          swap=true;
          }
      }
  }
  while(swap);
  </code></pre>
  
  <p>It only returns top two results properly and the rest as 0. I am sorting floats.</p>