summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoe Traver <[email protected]>2022-10-18 20:40:02 -0700
committerJoe Traver <[email protected]>2022-10-18 20:40:02 -0700
commit51ba02af88878856668565e8a2dc06c8fa52723c (patch)
tree4b2bb6b755a6bbfb421689c3f6aa75ceaed1944d
parentStep 5 Complete (diff)
downloadcst116-lab1-joetraver30-51ba02af88878856668565e8a2dc06c8fa52723c.tar.xz
cst116-lab1-joetraver30-51ba02af88878856668565e8a2dc06c8fa52723c.zip
Step 6 Complete. Changed varable wording of height to length
-rw-r--r--BlankConsoleLab/BlankConsoleLab.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/BlankConsoleLab/BlankConsoleLab.cpp b/BlankConsoleLab/BlankConsoleLab.cpp
index a331666..8d2c501 100644
--- a/BlankConsoleLab/BlankConsoleLab.cpp
+++ b/BlankConsoleLab/BlankConsoleLab.cpp
@@ -11,33 +11,35 @@ using std::endl;
int main()
{
- int height;
+ int length;
int width;
float area;
float meters;
+ float ratio;
- cout << "Enter height of kite in cm: ";
- cin >> height;
+ cout << "Enter Length of kite in cm: ";
+ cin >> length;
cout << "Enter width of kite in cm: ";
cin >> width;
- cout << "Height = " << height << " cm" << endl;
+ cout << "Length = " << length << " cm" << endl;
cout << "Width = " << width << " cm" << endl;
// area calculation
- area = (height * width) / 2;
+ area = (length * width) / 2;
// unit conversion
meters = area / 10000;
cout << "Kite area: " << meters << " square meters" << endl;
-
+// aspect ratio
+ ratio = width / length;
}