diff options
Diffstat (limited to 'BlankConsoleLab/CST116_Lab1_Williams_PSEUDOCODE.txt')
| -rw-r--r-- | BlankConsoleLab/CST116_Lab1_Williams_PSEUDOCODE.txt | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/BlankConsoleLab/CST116_Lab1_Williams_PSEUDOCODE.txt b/BlankConsoleLab/CST116_Lab1_Williams_PSEUDOCODE.txt new file mode 100644 index 0000000..ec61e01 --- /dev/null +++ b/BlankConsoleLab/CST116_Lab1_Williams_PSEUDOCODE.txt @@ -0,0 +1,32 @@ +program start: + +find hConsole to do black magic color printing stuff + +define (void) colorPrint and (void) multiColorPrint + +define (float) getWidthOrHeight, because both inputs do the same thing: + loop forever: + ask the user to input the width or height of their kite in cm + get user input + if the input is a float AND the input is in (1, 400): + break out of the loop + else: + tell the user their input needs to be a number between 1 and 400 + repeat the loop + + return width/height + +main: + say hi to the user + + get width and height in cm from the user and assign them to variables + + compute the area in m^2 and tell it to the user + + compute the aspect ratio and tell it to the user + if the aspect ratio is less than 1 or more than 5, warn the user that their kite may be unstable + + compute the mass of the kite in kg and tell it to the user + + compute the gravitational pull on the kite in newtons and tell it to the user +program end
\ No newline at end of file |