From e2ccbbce03953fc9ce4857403abb163634e0125c Mon Sep 17 00:00:00 2001 From: jacobdw22 Date: Thu, 6 Oct 2022 15:30:09 -0700 Subject: simple changes --- BlankConsoleLab/cst116-lab1-wilson.cpp | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) (limited to 'BlankConsoleLab/cst116-lab1-wilson.cpp') diff --git a/BlankConsoleLab/cst116-lab1-wilson.cpp b/BlankConsoleLab/cst116-lab1-wilson.cpp index ed5f807..1f61197 100644 --- a/BlankConsoleLab/cst116-lab1-wilson.cpp +++ b/BlankConsoleLab/cst116-lab1-wilson.cpp @@ -11,6 +11,31 @@ using std::endl; int main() { - cout << "Hello World!\n"; + float width = 0; + float length = 0; + float area; + float aspect_ratio; + + cout << "What is the width of the kite in centimeters: "; + cin >> width; + + cout << "What is the length of the kite in centimeters: "; + cin >> length; + + cout << "The width is " << width << " centimeters and the length is " + << length << " centimeters." << endl; + + area = (length * width) / 2; + + cout << "The area of the kite is " << area / 10000 << " square meters." << endl; + + aspect_ratio = width / length; + + if (aspect_ratio >= 1) + cout << "WARNING! A lower aspect ratio will provide more stability."; + + else (aspect_ratio < 1); + cout << "Good aspect ratio."; + } -- cgit v1.2.3