From ef3f64e41585b2d6cb329e7c01aead74d1ac1b7a Mon Sep 17 00:00:00 2001 From: JonCr Date: Fri, 21 Oct 2022 23:57:38 -0700 Subject: Finished --- CST116-lab1-Crombie-pseudocode.txt | 39 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 CST116-lab1-Crombie-pseudocode.txt (limited to 'CST116-lab1-Crombie-pseudocode.txt') 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 -- cgit v1.2.3