diff options
| author | Wyatt <[email protected]> | 2022-10-18 20:24:18 -0700 |
|---|---|---|
| committer | Wyatt <[email protected]> | 2022-10-18 20:24:18 -0700 |
| commit | c1d818d1999432f51f051c1e52cf41905cbd5619 (patch) | |
| tree | 88ec155f2d9e2aed3bd24b35acea417f96d60574 /BlankConsoleLab/BlankConsoleLab.cpp | |
| parent | first changes (diff) | |
| download | cst116-lab1-johnson-c1d818d1999432f51f051c1e52cf41905cbd5619.tar.xz cst116-lab1-johnson-c1d818d1999432f51f051c1e52cf41905cbd5619.zip | |
part one
Diffstat (limited to 'BlankConsoleLab/BlankConsoleLab.cpp')
| -rw-r--r-- | BlankConsoleLab/BlankConsoleLab.cpp | 23 |
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; + } + } |