summaryrefslogtreecommitdiff
path: root/BlankConsoleLab/BlankConsoleLab.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'BlankConsoleLab/BlankConsoleLab.cpp')
-rw-r--r--BlankConsoleLab/BlankConsoleLab.cpp26
1 files changed, 17 insertions, 9 deletions
diff --git a/BlankConsoleLab/BlankConsoleLab.cpp b/BlankConsoleLab/BlankConsoleLab.cpp
index ce7017e..d6dde49 100644
--- a/BlankConsoleLab/BlankConsoleLab.cpp
+++ b/BlankConsoleLab/BlankConsoleLab.cpp
@@ -10,10 +10,14 @@ using std::cin;
using std::endl;
//Variables used in the programming.
- float w;
+ float width;
float length;
float Area;
float aspectR;
+ float Mass;
+
+ float graPull;
+
int main()
{
@@ -22,11 +26,11 @@ int main()
cout << "Hello welcome to the Kite App" << endl << endl;
cout << "Please enter your kite's width in CM "<< endl;
- cin >> w;
- while (w < 1 || w > 400)
+ cin >> width;
+ while (width < 1 || width > 400)
{
cout << "Please enter your kite's width in CM " << endl;
- cin >> w;
+ cin >> width;
}
//Enter Width and Length in centimeters
@@ -40,24 +44,24 @@ int main()
//Output the measures entered by user
cout << "Your kite Measurements is ";
- cout << w;
+ cout << width;
cout << " By ";
cout <<length << endl;
//Area is calculated and converted to square meters.
//Area calculation
- Area = (w * length) / 2;
+ Area = (width * length) / 2;
//Conversion calculation to square meters.
Area = Area / 10000;
//Output of the area calculation to square meters.
cout << "The area of the kite in squre meter is ";
- cout << Area;
+ cout << Mass;
cout << " Square Meters" <<endl;
-
- aspectR = w / length;
+ //Aspect Ratio
+ aspectR = width / length;
cout << "The aspect ratio of your kite is ";
cout << aspectR << endl;
@@ -66,6 +70,10 @@ int main()
cout << "Keep in mind, a lower aspect ratio would provide more stability";
}
+ Mass = Area * 135 / 1000;
+
+ graPull = Mass * 9.8;
+ cout << "Your Kite Weighs: " <<endl;
}