summaryrefslogtreecommitdiff
path: root/BlankConsoleLab/BlankConsoleLab.cpp
diff options
context:
space:
mode:
authorCEOofOogaBooga <[email protected]>2022-10-18 19:32:58 -0700
committerCEOofOogaBooga <[email protected]>2022-10-18 19:32:58 -0700
commitfee0f85ca8c92eea0fd2a07f229e558577ffd882 (patch)
tree296d1c649d6e7f66436295343620d5624040af8a /BlankConsoleLab/BlankConsoleLab.cpp
parentArea step again (diff)
downloadcst116-lab1--trinh--fee0f85ca8c92eea0fd2a07f229e558577ffd882.tar.xz
cst116-lab1--trinh--fee0f85ca8c92eea0fd2a07f229e558577ffd882.zip
ratio part
Diffstat (limited to 'BlankConsoleLab/BlankConsoleLab.cpp')
-rw-r--r--BlankConsoleLab/BlankConsoleLab.cpp6
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";
+
+
}