summaryrefslogtreecommitdiff
path: root/BlankConsoleLab/BlankConsoleLab.cpp
diff options
context:
space:
mode:
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;