summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--BlankConsoleLab/BlankConsoleLab.cpp3
-rw-r--r--CST116-lab1-Crombie-pseudocode.txt39
2 files changed, 41 insertions, 1 deletions
diff --git a/BlankConsoleLab/BlankConsoleLab.cpp b/BlankConsoleLab/BlankConsoleLab.cpp
index 401079f..c79afb9 100644
--- a/BlankConsoleLab/BlankConsoleLab.cpp
+++ b/BlankConsoleLab/BlankConsoleLab.cpp
@@ -137,4 +137,5 @@ void CalcGP(float mass)
gravitationalPull = mass * 9.8;
cout << endl << "The gravitational pull on your kite is " << gravitationalPull << " N/kg" << endl;
-} \ No newline at end of file
+}
+// Finished \ No newline at end of file
diff --git a/CST116-lab1-Crombie-pseudocode.txt b/CST116-lab1-Crombie-pseudocode.txt
new file mode 100644
index 0000000..07b91e9
--- /dev/null
+++ b/CST116-lab1-Crombie-pseudocode.txt
@@ -0,0 +1,39 @@
+Declare functions
+Declare variables and set equal to 0
+Run function to get length
+ Print "Enter kite length in centimeters: "
+ Input length
+ While length is greater than 400
+ Ask user to re-input length
+ While length is less than 1
+ Ask user to re-input length
+Set length equal to input
+Run function to get width
+ Print "Enter kite width in centimeters: "
+ Input width
+ While width is greater than 400
+ Ask user to re-input width
+ While width is less than 1
+ Ask user to re-input width
+Set width equal to input
+Run function to calculate aspect ratio
+ Set aspectRatio equal to width divided by length
+ Print the length entered by the user
+ Print the width entered by the user
+ Print "Your kite's aspect ratio is: "
+ Print aspectRatio
+ If aspectRatio is greater than or equal to 1
+ Print warning message
+Run function to calculate area
+ Set area equal to width multiplied by length, all divided by 2
+ Set area equal to previous area multiplied by 10000
+ Print the area of the kite
+Set area equal to what was calculated
+Run function to calculate mass
+ Declare variable for fabric weight
+ Set mass equal to area times fabricWeight all divided by 1000
+ Print the kite's mass
+Set mass equal to what as calculated
+Run function to calculate gravitational pull
+ Set gravitationalPull equal to mass times 9.8
+ Print the kite's gravitational pull \ No newline at end of file