Sorting

  • November 2019
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Sorting as PDF for free.

More details

  • Words: 43
  • Pages: 1
#include #include<stdio.h> void main(void) { int temp, i, j; int ar[10]; printf("enter elements of array:\n") for(i=0; i<10; i++) scanf("%d",&ar[i]); // sorting is done here for(i=0;i<10;i++) for(j=0; j<(10-1); j++) if (ar[j]>ar[j+1]) { temp=ar[j]; ar[j]=ar[j+1]; ar[j+1]=temp; } // till here for(i=0; i<10; i++) printf("\n%d",ar[i]); }

Related Documents

Sorting
May 2020 22
Sorting
July 2020 22
Sorting
April 2020 18
Sorting
November 2019 28
Sorting
April 2020 29
Size Sorting
May 2020 32