From 4b2d3fb1fd62f0f193cf5a40921434ada7e3085f Mon Sep 17 00:00:00 2001 From: Joe Traver Date: Wed, 19 Oct 2022 22:14:59 -0700 Subject: Adjust end calculations and streamine --- BlankConsoleLab/BlankConsoleLab.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'BlankConsoleLab/BlankConsoleLab.cpp') 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; -- cgit v1.2.3