Advertisement
thezxtreme

Untitled

Dec 1st, 2020
1,037
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.34 KB | None | 0 0
  1. #include <iostream>
  2. #include <vector>
  3. #include <algorithm>
  4.  
  5. using Data = std::vector<uint32_t>;
  6.  
  7. auto min(const Data& _data) -> Data::value_type
  8. {
  9.     return *std::min_element(_data.cbegin(), _data.cend());
  10. }
  11.  
  12. auto main() -> int
  13. {
  14.     Data data = { 2, 7, 3, 4 ,5 };
  15.     std::cout << min(data) << "\n";
  16.  
  17.     return EXIT_SUCCESS;
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement