()
| 100 | |
| 101 | //function to sort the incoming elements |
| 102 | void sort() |
| 103 | { |
| 104 | int temp; |
| 105 | for(int i=0;i<=lastIndex;i++) |
| 106 | { |
| 107 | for(int j=i+1;j<=lastIndex;j++) |
| 108 | { |
| 109 | if(arr[i]>arr[j]) |
| 110 | { |
| 111 | temp = arr[i]; |
| 112 | arr[i] = arr[j]; |
| 113 | arr[j] = temp; |
| 114 | } |
| 115 | } |
| 116 | } |
| 117 | } |
| 118 | } |
| 119 | |
| 120 | class Gssarray |