shushus

Спринт 2. Ограниченность памяти и переполнение.

Dec 7th, 2022
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.48 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();    // минимальное значение типа int64_t
  9.         const auto max = numeric_limits<uint64_t>::max(); // максимальное значение типа uint64_t
  10.     cout<<min<<endl;
  11.     cout<<max<<endl;
  12.     cout<<min+max<<endl;
  13.     cout<<min*2<<endl;
  14.     cout<<max*2<<endl;
  15.     // выведите 5 чисел
  16. }
Advertisement
Add Comment
Please, Sign In to add comment