summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDoolyBoi <[email protected]>2022-10-19 20:10:46 -0700
committerDoolyBoi <[email protected]>2022-10-19 20:10:46 -0700
commit3e4712f3fd8c3a0cdf3fff32a07fe914256fd32c (patch)
tree39165c0775ad0d938ccb6a9abe23eca55705693e
parentfixed note (diff)
downloadcst116-lab1-abd00l4h-3e4712f3fd8c3a0cdf3fff32a07fe914256fd32c.tar.xz
cst116-lab1-abd00l4h-3e4712f3fd8c3a0cdf3fff32a07fe914256fd32c.zip
added mass and gravitational pull calculation
-rw-r--r--BlankConsoleLab/BlankConsoleLab.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/BlankConsoleLab/BlankConsoleLab.cpp b/BlankConsoleLab/BlankConsoleLab.cpp
index 22fb44e..0ce3b2c 100644
--- a/BlankConsoleLab/BlankConsoleLab.cpp
+++ b/BlankConsoleLab/BlankConsoleLab.cpp
@@ -20,7 +20,7 @@ using std::endl;
int main()
{
//seting up variables
- float length, width, area, aspectRatio;
+ float length, width, area, aspectRatio, mass, gPull;
bool dimensions = false;
//keeps on looping until the user inputs a length and a width between 1 and 400
@@ -59,8 +59,12 @@ int main()
cout << "NOTE: A lower aspect ratio (below 1) would provide more stability";
}
+ //calculating mass of kite
+ mass = (area * 135) / 1000;
+ //calculating gravitational pull
+ gPull = mass * 9.8;
-
+ cout << "Your kite weighs " << gPull << " kg."
}