From c1d818d1999432f51f051c1e52cf41905cbd5619 Mon Sep 17 00:00:00 2001 From: Wyatt Date: Tue, 18 Oct 2022 20:24:18 -0700 Subject: part one --- BlankConsoleLab/BlankConsoleLab.cpp | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) (limited to 'BlankConsoleLab/BlankConsoleLab.cpp') 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; + } + } -- cgit v1.2.3