summaryrefslogtreecommitdiff
path: root/BlankConsoleLab/BlankConsoleLab.cpp
diff options
context:
space:
mode:
authorWyatt <[email protected]>2022-10-18 20:24:18 -0700
committerWyatt <[email protected]>2022-10-18 20:24:18 -0700
commitc1d818d1999432f51f051c1e52cf41905cbd5619 (patch)
tree88ec155f2d9e2aed3bd24b35acea417f96d60574 /BlankConsoleLab/BlankConsoleLab.cpp
parentfirst changes (diff)
downloadcst116-lab1-johnson-c1d818d1999432f51f051c1e52cf41905cbd5619.tar.xz
cst116-lab1-johnson-c1d818d1999432f51f051c1e52cf41905cbd5619.zip
part one
Diffstat (limited to 'BlankConsoleLab/BlankConsoleLab.cpp')
-rw-r--r--BlankConsoleLab/BlankConsoleLab.cpp23
1 files changed, 17 insertions, 6 deletions
diff --git a/BlankConsoleLab/BlankConsoleLab.cpp b/BlankConsoleLab/BlankConsoleLab.cpp
index 21341ed..5cb2039 100644
--- a/BlankConsoleLab/BlankConsoleLab.cpp
+++ b/BlankConsoleLab/BlankConsoleLab.cpp
@@ -13,19 +13,30 @@ using namespace std;
int main()
{
- float width = 0, height = 0;
- float area;
+ float width = 0, length = 0;
- cout << "Please input your kites width: ";
+ cout << "Please input your kites width in centimeters: ";
cin >> width;
cout << endl;
- cout << "Please input your kites height: ";
- cin >> height;
+ cout << "Please input your kites height in centimeters: ";
+ cin >> length;
cout << endl;
- cout << "Your kites width will be: " << width << "\nYour kites height will be: " << height << endl;
+ cout << "Your kites width will be: " << width << " cm\nYour kites height will be: " << length << " cm" << endl;
+
+
+ float area = (width / length) / 10000;
+
+ cout << "The area of your kite in square meters is " << area << endl;
+
+ float aspect_ratio = width / length;
+ if (aspect_ratio > 1)
+ {
+ cout << "Your aspect ration is greater than 1 (width/length: " << width << "/" << length << " = " << aspect_ratio << ")\nLower aspect ratios will have greater stability." << endl;
+ }
+
}