diff options
| -rw-r--r-- | BlankConsoleLab/CST-116-Project1-Florea.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/BlankConsoleLab/CST-116-Project1-Florea.cpp b/BlankConsoleLab/CST-116-Project1-Florea.cpp index df81f12..bde2914 100644 --- a/BlankConsoleLab/CST-116-Project1-Florea.cpp +++ b/BlankConsoleLab/CST-116-Project1-Florea.cpp @@ -20,6 +20,7 @@ int main() float width = 0; float length = 0; float area, ratio; + double gravitatonal_pull; // This will take in input for width and length in the range of 1, 400 inclusive. If it's outside the range, // then the loop will repeat until given the correct values. @@ -39,9 +40,13 @@ int main() cout << "Area (in square meters): " << area << " M^2" << endl; - const float mass = 135 * area; // Finds the total mass of the kite. - cout << "If your kite is using a medium weight fabric, it is calculated to weigh: " << mass << " grams/meter^2" - << endl; + const float mass = (135 * area) / 1000; // Finds the total mass of the kite. + cout << "If your kite is using a medium weight fabric (135g/sq meter), " + "it is calculated to weigh: " << mass << " kg/meter^2" + << endl; + + gravitatonal_pull = mass * 9.8; + cout << "Gravitational pull on your kite is: " << gravitatonal_pull << " (mass * 9.8 N/kg)" << endl; ratio = width / length; // Finds aspect ratio of kite |