diff options
| author | Joe Traver <[email protected]> | 2022-10-19 22:14:59 -0700 |
|---|---|---|
| committer | Joe Traver <[email protected]> | 2022-10-19 22:14:59 -0700 |
| commit | 4b2d3fb1fd62f0f193cf5a40921434ada7e3085f (patch) | |
| tree | 4e03c50a0b24fa633d3b0fcfd77afc110657b60d /BlankConsoleLab/BlankConsoleLab.cpp | |
| parent | Added the mass calculation and the formulas for gravitational pull (diff) | |
| download | cst116-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.cpp | 12 |
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; |