summaryrefslogtreecommitdiff
path: root/BlankConsoleLab/cst116-lab1-wilson.cpp
diff options
context:
space:
mode:
authorjacobdw22 <[email protected]>2022-10-06 15:30:09 -0700
committerjacobdw22 <[email protected]>2022-10-06 15:30:09 -0700
commite2ccbbce03953fc9ce4857403abb163634e0125c (patch)
tree1ee5b7b7418e56f4fcb08c9542911b7fedf98bc3 /BlankConsoleLab/cst116-lab1-wilson.cpp
parentsimple changes (diff)
downloadcst116-lab1-jacobdw22-e2ccbbce03953fc9ce4857403abb163634e0125c.tar.xz
cst116-lab1-jacobdw22-e2ccbbce03953fc9ce4857403abb163634e0125c.zip
simple changes
Diffstat (limited to 'BlankConsoleLab/cst116-lab1-wilson.cpp')
-rw-r--r--BlankConsoleLab/cst116-lab1-wilson.cpp27
1 files changed, 26 insertions, 1 deletions
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.";
+
}