Advertisement
Josif_tepe

Untitled

May 24th, 2021
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.38 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4.  
  5. template<typename T>
  6. void sortiraj(T arr[], int n) {
  7.     for(int i = 0; i < n; i++) {
  8.         for(int j = i + 1; j < n; j++) {
  9.             if(arr[i] > arr[j]) {
  10.                 T tmp = arr[i];
  11.                 arr[i] = arr[j];
  12.                 arr[j] = tmp;
  13.             }
  14.         }
  15.     }
  16. }
  17. int main()
  18. {
  19.    
  20.     return 0;
  21. }
  22.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement