SHARE
TWEET

Untitled

a guest Nov 11th, 2019 69 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. pair<int,int> minmax(vector<int> tablica, int rozmiar) {
  2.     int min = tablica[0];
  3.     int max = tablica[0];
  4.     for (int i = 0; i < rozmiar; i++) {
  5.         if (min > tablica[i])
  6.             min = tablica[i];
  7.         if (max < tablica[i])
  8.             max = tablica[i];
  9.     }
  10.     pair<int,int> minmax = make_pair(min,max);
  11.     return minmax;
  12. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top