diff options
| -rw-r--r-- | BlankConsoleLab/BlankConsoleLab.cpp | 24 |
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; |