summaryrefslogtreecommitdiff
path: root/BlankConsoleLab/BlankConsoleLab.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'BlankConsoleLab/BlankConsoleLab.cpp')
-rw-r--r--BlankConsoleLab/BlankConsoleLab.cpp27
1 files changed, 24 insertions, 3 deletions
diff --git a/BlankConsoleLab/BlankConsoleLab.cpp b/BlankConsoleLab/BlankConsoleLab.cpp
index ed5f807..e80106c 100644
--- a/BlankConsoleLab/BlankConsoleLab.cpp
+++ b/BlankConsoleLab/BlankConsoleLab.cpp
@@ -3,14 +3,35 @@
#include <iostream>
-using namespace std;
-
using std::cout;
using std::cin;
using std::endl;
int main()
{
- cout << "Hello World!\n";
+ int width;
+ int length;
+ float areaCM;
+ float areaM;
+ float ratio;
+
+ cout << "Please enter the length of your kite." << endl;
+ cin >> length;
+
+ cout << "\nPlease enter the width of your kite." << endl;
+ cin >> width;
+ cout << "\n";
+
+ areaCM = (width * length) / 2;
+ areaM = areaCM / 10000;
+ ratio = width / length;
+
+ if (ratio >= 1)
+ {
+ cout << "WARNING: A lower aspect ratio \nwill provide more stability!\n" << endl;
+ }
+
+ cout << "Your kite has an area of: " << areaM << " square meters" << endl;
+ cout << "Your kite has an area of: " << areaCM << " square centimeters" << endl;
}