summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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.";
+
}