diff options
Diffstat (limited to 'BlankConsoleLab/BlankConsoleLab.cpp')
| -rw-r--r-- | BlankConsoleLab/BlankConsoleLab.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/BlankConsoleLab/BlankConsoleLab.cpp b/BlankConsoleLab/BlankConsoleLab.cpp index 6c60d41..d0675e0 100644 --- a/BlankConsoleLab/BlankConsoleLab.cpp +++ b/BlankConsoleLab/BlankConsoleLab.cpp @@ -12,6 +12,7 @@ using namespace std; int width = 0; int length = 0; float area = 0; +float ratio = 0; int main() { cout << "Enter width in cm: "; @@ -20,6 +21,11 @@ int main() cin >> length; area = ((length * width)/2.0)/10000.0; cout << "Area in square meters: " << area; + cout << "ratio in cm: " << ratio = width / length << endl; + if ratio >= 1 + cout "Warning: use a lower ratio for stability"; + + } |