Advertisement
rengetsu

Timus_2066

Jul 20th, 2018
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.60 KB | None | 0 0
  1. //Timus 2066
  2. #include <iostream>
  3. using namespace std;
  4. int main()
  5. {
  6.     int a, b, c, v, min=1000001;
  7.     cin >> a >> b >> c;
  8.     v = a + b + c; // + +
  9.     if(v<min){min=v;}
  10.     v = a + b - c; // + -
  11.     if(v<min){min=v;}
  12.     v = a + (b * c); //+ *
  13.     if(v<min){min=v;}
  14.     v = a - b + c; // - +
  15.     if(v<min){min=v;}
  16.     v = a - b - c; // - -
  17.     if(v<min){min=v;}
  18.     v = a - b * c; // - *
  19.     if(v<min){min=v;}
  20.     v = a * b + c; // * +
  21.     if(v<min){min=v;}
  22.     v = a * b - c; // * -
  23.     if(v<min){min=v;}
  24.     v = a * b * c; // * *
  25.     if(v<min){min=v;}
  26.     cout << min;
  27.     return 0;
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement