summaryrefslogtreecommitdiff
path: root/BlankConsoleLab/BlankConsoleLab.cpp
diff options
context:
space:
mode:
authorCEOofOogaBooga <[email protected]>2022-10-18 20:06:37 -0700
committerCEOofOogaBooga <[email protected]>2022-10-18 20:06:37 -0700
commitce5d89f31ebaa263187737714665e281af798db5 (patch)
treea43f8aee3676145e48c8dcc9ca5198ea44aeca5f /BlankConsoleLab/BlankConsoleLab.cpp
parentTest of Gravity and Mass (diff)
downloadcst116-lab1--trinh--ce5d89f31ebaa263187737714665e281af798db5.tar.xz
cst116-lab1--trinh--ce5d89f31ebaa263187737714665e281af798db5.zip
Formatted
Diffstat (limited to 'BlankConsoleLab/BlankConsoleLab.cpp')
-rw-r--r--BlankConsoleLab/BlankConsoleLab.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/BlankConsoleLab/BlankConsoleLab.cpp b/BlankConsoleLab/BlankConsoleLab.cpp
index 60facc6..3b768ac 100644
--- a/BlankConsoleLab/BlankConsoleLab.cpp
+++ b/BlankConsoleLab/BlankConsoleLab.cpp
@@ -21,8 +21,8 @@ int main()
{
cout << "Enter width in cm: ";
cin >> width;
- if (width > 400 || 1 > width)
- cout << "Number cannot be greater than 400 or less than 1" << endl;
+ if (width > 400 || 1 > width)
+ cout << "Number cannot be greater than 400 or less than 1" << endl;
};
while (length > 400 || 1 > length)
{
@@ -31,16 +31,16 @@ int main()
if (length > 400 || 1 > length)
cout << "Number cannot be greater than 400 or less than 1" << endl;
};
- area = ((length * width)/2.0)/10000.0;
- cout << "Area in square meters: " << area << endl;
- ratio = width / length;
- cout << "Ratio: " << ratio << endl;
- if (ratio >= 1)
- cout << "Warning: use a lower ratio for stability" << endl;
- mass = (area * 135) / 1000;
- output << "Mass in kg: " << mass << endl;
- gravitational_pull = mass * 9.8;
- output << "Gravitational pull is: " << gravitational_pull << endl;
+ area = ((length * width)/2.0)/10000.0;
+ cout << "Area in square meters: " << area << endl;
+ ratio = width / length;
+ cout << "Ratio: " << ratio << endl;
+ if (ratio >= 1)
+ cout << "Warning: use a lower ratio for stability" << endl;
+ mass = (area * 135) / 1000;
+ cout << "Mass in kg: " << mass << endl;
+ gravitational_pull = mass * 9.8;
+ cout << "Gravitational pull is: " << gravitational_pull << endl;