summaryrefslogtreecommitdiff
path: root/BlankConsoleLab/BlankConsoleLab.cpp
diff options
context:
space:
mode:
authorJoe Traver <[email protected]>2022-10-19 22:14:59 -0700
committerJoe Traver <[email protected]>2022-10-19 22:14:59 -0700
commit4b2d3fb1fd62f0f193cf5a40921434ada7e3085f (patch)
tree4e03c50a0b24fa633d3b0fcfd77afc110657b60d /BlankConsoleLab/BlankConsoleLab.cpp
parentAdded the mass calculation and the formulas for gravitational pull (diff)
downloadcst116-lab1-joetraver30-4b2d3fb1fd62f0f193cf5a40921434ada7e3085f.tar.xz
cst116-lab1-joetraver30-4b2d3fb1fd62f0f193cf5a40921434ada7e3085f.zip
Adjust end calculations and streamine
Diffstat (limited to 'BlankConsoleLab/BlankConsoleLab.cpp')
-rw-r--r--BlankConsoleLab/BlankConsoleLab.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/BlankConsoleLab/BlankConsoleLab.cpp b/BlankConsoleLab/BlankConsoleLab.cpp
index 3fb3426..85c6c8d 100644
--- a/BlankConsoleLab/BlankConsoleLab.cpp
+++ b/BlankConsoleLab/BlankConsoleLab.cpp
@@ -17,10 +17,9 @@ int main()
float area_m;
float ratio;
int grav = 9.81;
- float mass;
int weight = 135;
- int grav_pull;
- int masskg;
+ float grav_pull;
+ float masskg;
do
@@ -58,14 +57,13 @@ int main()
// mass calculation
- mass = (area_m * weight) / grav;
+ masskg = (area_m * weight) / 1000;
- cout << "Total mass of the kite is: " << mass << " Grams" << endl;
+ cout << "Total mass of the kite is: " << masskg << " Kg" << endl;
//force applied to the kite converted to Newtons
- masskg = mass / 1000;
- grav_pull = mass * grav;
+ grav_pull = masskg * grav;
cout << "Gravitational pull applied to the kite is: " << grav_pull << " Newtons" << endl;