summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjacobdw22 <[email protected]>2022-10-19 23:02:15 -0700
committerjacobdw22 <[email protected]>2022-10-19 23:02:15 -0700
commit41c8fabd96b599c4fd4562c47541bb470219e3a0 (patch)
tree12817a88660d8368a9b3d51e13fff1ae0cb08889
parentsemi-final changes (diff)
downloadcst116-lab1-jacobdw22-master.tar.xz
cst116-lab1-jacobdw22-master.zip
final changesHEADmaster
-rw-r--r--BlankConsoleLab/cst116-lab1-wilson.cpp7
-rw-r--r--LabResults.txt14
-rw-r--r--cst116-lab1-wilson-pseudo-code.txt4
3 files changed, 17 insertions, 8 deletions
diff --git a/BlankConsoleLab/cst116-lab1-wilson.cpp b/BlankConsoleLab/cst116-lab1-wilson.cpp
index 81f393d..bec8efa 100644
--- a/BlankConsoleLab/cst116-lab1-wilson.cpp
+++ b/BlankConsoleLab/cst116-lab1-wilson.cpp
@@ -16,6 +16,7 @@ int main()
float area;
float mass;
float aspect_ratio;
+ float gravitational_pull;
while (true) {
cout << "What is the width of the kite in centimeters: ";
@@ -49,7 +50,11 @@ int main()
mass = 135 * (area / 10000);
- cout << "\nThe mass of your kite is " << mass << " grams / sq meter.\n";
+ cout << "\nThe mass of your kite is " << mass << " grams.\n";
+
+ gravitational_pull = mass * 9.81;
+
+ cout << "\nThe gravitational pull of your kite is " << gravitational_pull << " grams * m/s^2\n";
return 0;
}
diff --git a/LabResults.txt b/LabResults.txt
index ac10a69..9bf1b6d 100644
--- a/LabResults.txt
+++ b/LabResults.txt
@@ -10,12 +10,14 @@ WARNING! Aspect ratio >= 1. Unstable.
--Part 2: Can it fly?--
-What is the width of the kite in centimeters: 15
-What is the length of the kite in centimeters: 15
+What is the width of the kite in centimeters: 200
+What is the length of the kite in centimeters: 300
-The width is 15 centimeters and the length is 15 centimeters.
-The area of the kite is 0.01125 square meters.
+The width is 200 centimeters and the length is 300 centimeters.
+The area of the kite is 3 square meters.
-WARNING! Aspect ratio >= 1. Unstable.
+Aspect ratio < 1. Good aspect ratio.
+
+The mass of your kite is 405 grams.
-The mass of your kite is 1.51875 grams / sq meter. \ No newline at end of file
+The gravitational pull of your kite is 3973.05 grams * m/s^2 \ No newline at end of file
diff --git a/cst116-lab1-wilson-pseudo-code.txt b/cst116-lab1-wilson-pseudo-code.txt
index 1c0fb41..ca8aee9 100644
--- a/cst116-lab1-wilson-pseudo-code.txt
+++ b/cst116-lab1-wilson-pseudo-code.txt
@@ -22,7 +22,9 @@ IF aspect_ratio >= 1, DISPLAY "WARNING! Aspect ratio >= 1. Unstable.";
ELSE, DISPLAY "Aspect ratio < 1. Good aspect ratio.";
mass = 135 * (area/10000);
+DISPLAY "The mass of your kite is " mass " grams.";
-DISPLAY "The mass of your kite is " mass " grams / sq meter.";
+gravitational_pull = mass * 9.81;
+DISPLAY "The gravitational pull of your kite is " gravitational_pull " grams * m/s^2";
RETURN \ No newline at end of file