Advertisement
chevengur

СПРИНТ № 2 | Числовые типы | Урок 4: Ограниченность памяти и переполнение

Oct 9th, 2023 (edited)
197
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.37 KB | None | 0 0
  1. #include <cstdint>
  2. #include <iostream>
  3. #include <limits>
  4.  
  5. using namespace std;
  6.  
  7. int main() {
  8.     const auto min = numeric_limits<int64_t>::min();
  9.     const auto max = numeric_limits<uint64_t>::max();
  10.  
  11.     std::cout << min << endl;
  12.     std::cout << max << endl;
  13.     std::cout << min + max << endl;
  14.     std::cout << min * 2 << endl;
  15.     std::cout << max * 2 << endl;
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement