|
|
вернуться в форумPrimitive enumeration of all options c++ //We need to sort out 3 in the second power of the options for the arrangement of signs #include <iostream> using namespace std; int main() { int a, b, c, min; cin >> a >> b >> c; min = a + b + c; if(a + b - c < min) min = a + b - c; if(a - b + c < min) min = a - b + c; if(a - b - c < min) min = a - b - c; if(a - b + c < min) min = a - b + c; if(a - b * c < min) min = a - b * c; if(a * b * c < min) min = a * b * c; if(a * b + c < min) min = a * b + c; if(a * b - c < min) min = a * b - c; cout << min; return 0; } |
|
|