Advertisement
VEGASo

Lab #3 Ex. 2

Oct 25th, 2022
472
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.36 KB | None | 0 0
  1. #include <iostream>
  2. #include <limits>
  3.  
  4. using namespace std;
  5.  
  6.  
  7. int main()
  8. {
  9.     for (int i = 3; i >= -3; i--)
  10.     {
  11.         if (i >= 0)
  12.             cout << numeric_limits<int>::min() << "+" << i << " = " << numeric_limits<int>::min() + i << endl;
  13.         else if(i < 0)
  14.             cout << numeric_limits<int>::min() << i << " = " << numeric_limits<int>::min() - i << endl;
  15.     }
  16.  
  17.     return 0;
  18. }
  19.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement