diff options
Diffstat (limited to 'BlankConsoleLab/BlankConsoleLab.cpp')
| -rw-r--r-- | BlankConsoleLab/BlankConsoleLab.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/BlankConsoleLab/BlankConsoleLab.cpp b/BlankConsoleLab/BlankConsoleLab.cpp index 01f5b44..c9deecf 100644 --- a/BlankConsoleLab/BlankConsoleLab.cpp +++ b/BlankConsoleLab/BlankConsoleLab.cpp @@ -17,7 +17,7 @@ using std::endl; int main() { - float width, length; + float width, length, area, ratio; cout << "Please enter the WIDTH of your kite in centimeters (decimals are OK): "; cin >> width; @@ -26,6 +26,16 @@ int main() cout << "Width: " << width << " | Length: " << length << endl; + area = (width * length) / 2; + area /= 10000; + + cout << "Area (in square meters): " << area << " M^2" << endl; + + ratio = width / length; + if(ratio >= 1){ + cout << "Warning: a lower aspect ratio would provide more stability." << endl; + cout << "Current aspect ratio (width / length): " << ratio << endl; + } } |