diff options
Diffstat (limited to 'BlankConsoleLab/BlankConsoleLab.cpp')
| -rw-r--r-- | BlankConsoleLab/BlankConsoleLab.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/BlankConsoleLab/BlankConsoleLab.cpp b/BlankConsoleLab/BlankConsoleLab.cpp index 974c5af..bc9af16 100644 --- a/BlankConsoleLab/BlankConsoleLab.cpp +++ b/BlankConsoleLab/BlankConsoleLab.cpp @@ -10,6 +10,7 @@ int main() cout << "Kite Math 0.2" << endl; + //input do { cout << "Input the width of your kite (1-400 cm):" << endl; cin >> width; @@ -26,12 +27,13 @@ int main() cout << endl; } while (length < 1 || length > 400); - - area = (width * length) / 2; - area = area / 10000; + //calculations + area = ((width * length) / 2) / 10000; ratio = width / length; mass = massCon * area; + force = (mass / 1000) * 9.8; + //outputs cout << "Width: " << width << " cm" << endl; cout << "length: " << length << " cm" << endl; cout << "Ratio: " << ratio << endl; @@ -40,5 +42,6 @@ int main() } cout << "Area: " << area << " m^2" << endl; cout << "Mass: " << mass << " g" << endl; + cout << "Force of gravity: " << force << " N" << endl; } |