Удалить task5.cpp
This commit is contained in:
35
task5.cpp
35
task5.cpp
@@ -1,35 +0,0 @@
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
int main() {
|
||||
double a;
|
||||
double b;
|
||||
double c;
|
||||
double x;
|
||||
double y;
|
||||
|
||||
cout << "Enter the edges of the brick a, b, c: ";
|
||||
cin >> a >> b >> c;
|
||||
cout << "Enter the hole dimensions x, y: ";
|
||||
cin >> x >> y;
|
||||
|
||||
double min1 = a, min2 = b;
|
||||
|
||||
if (c < min1) {
|
||||
min2 = min1;
|
||||
min1 = c;
|
||||
}
|
||||
else if (c < min2) {
|
||||
min2 = c;
|
||||
}
|
||||
|
||||
if ((min1 <= x && min2 <= y) || (min1 <= y && min2 <= x)) {
|
||||
cout << "The brick will pass through the opening." << endl;
|
||||
}
|
||||
else {
|
||||
cout << "The brick won't fit through the opening.." << endl;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user