#include <iostream> using std::cout; using std::cin; using std::endl; int main() { int a; int b; int c; cout << "Введите размеры первой коробки(которую надо пеместить в другую): "; cin >> a >> b >> c; int m; int n; int k; cout << "Введите размеры второй коробки(в которую надо засунуть): "; cin >> m >> n >> k; if (a <= m && b <= n && c <= k || a <= n && b <= m && c <= k) { cout << "Можно"; }else if(a <= n && b <= m && c <= k || a <= m && b <= n && c <= k){ cout << "Можно"; }else if(c <= a && a <= c && k <= b || k <= c && n <= b && k <= a){ cout << "Можно"; } else { cout << "Нельзя"; } }
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter