summaryrefslogtreecommitdiff
path: root/BlankConsoleLab/BlankConsoleLab.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'BlankConsoleLab/BlankConsoleLab.cpp')
-rw-r--r--BlankConsoleLab/BlankConsoleLab.cpp29
1 files changed, 24 insertions, 5 deletions
diff --git a/BlankConsoleLab/BlankConsoleLab.cpp b/BlankConsoleLab/BlankConsoleLab.cpp
index 0705133..3fb3426 100644
--- a/BlankConsoleLab/BlankConsoleLab.cpp
+++ b/BlankConsoleLab/BlankConsoleLab.cpp
@@ -13,9 +13,14 @@ int main()
{
int length;
float width;
- float area;
- float meters;
+ float area_cm;
+ float area_m;
float ratio;
+ int grav = 9.81;
+ float mass;
+ int weight = 135;
+ int grav_pull;
+ int masskg;
do
@@ -35,12 +40,12 @@ int main()
// area calculation
- area = (length * width) / 2;
+ area_cm = (length * width) / 2;
// unit conversion
- meters = area / 10000;
+ area_m = area_cm / 10000;
- cout << "Kite area: " << meters << " square meters" << endl;
+ cout << "Kite area: " << area_m << " square meters" << endl;
// aspect ratio
ratio = width / length;
@@ -50,6 +55,20 @@ int main()
cout << "WARNING! A lower aspect ratio would provide more stability" << endl;
+
+
+ // mass calculation
+ mass = (area_m * weight) / grav;
+
+ cout << "Total mass of the kite is: " << mass << " Grams" << endl;
+
+ //force applied to the kite converted to Newtons
+
+ masskg = mass / 1000;
+ grav_pull = mass * grav;
+
+ cout << "Gravitational pull applied to the kite is: " << grav_pull << " Newtons" << endl;
+
return 0;
}