From 10c7e4c31beab434e51017d9177237e1062638f3 Mon Sep 17 00:00:00 2001 From: Nathanturcas Date: Sun, 23 Oct 2022 15:59:39 -0700 Subject: commit 2 --- BlankConsoleLab/BlankConsoleLab.cpp | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/BlankConsoleLab/BlankConsoleLab.cpp b/BlankConsoleLab/BlankConsoleLab.cpp index 53c8b7f..ba6bd72 100644 --- a/BlankConsoleLab/BlankConsoleLab.cpp +++ b/BlankConsoleLab/BlankConsoleLab.cpp @@ -11,21 +11,28 @@ using std::endl; int main() { - float width, height,area; + float width, length, area, ratio; cout << "Enter width (cm) : "; cin >> width; - cout << "Enter height (cm) : "; - cin >> height; + cout << "Enter length (cm) : "; + cin >> length; cout << "width: "; cout << width<< endl; - cout << "height: "; - cout << height << endl; + cout << "length: "; + cout << length << endl; - area = (width * height / 2) / 10000; + area = (width * length / 2) / 10000; cout << "area (m) : "; cout << area << endl; + ratio = width / length; + cout << "ratio: "; + cout << ratio << endl; + if (ratio >= 1) + cout << "a lower aspect ratio would provide more stability"; + + } -- cgit v1.2.3