fork download
  1. #include <stdio.h>
  2. void UpBubbleSort(int *arr,int len)
  3. {
  4. int i;
  5. for(i=0; i<(len); i++)
  6. {
  7. int temp;
  8. while(arr[i]>arr[i+1])
  9. {
  10. temp=arr[i];
  11. arr[i]=arr[i+1];
  12. arr[i+1]=temp;
  13. i=0;
  14. }
  15.  
  16. }
  17. }
  18. int main(void) {
  19. // your code goes here
  20. return 0;
  21. }
  22.  
Success #stdin #stdout 0s 2288KB
stdin
Standard input is empty
stdout
Standard output is empty