summaryrefslogtreecommitdiff
path: root/BlankConsoleLab/CST116_Lab1_Williams_PSEUDOCODE.txt
blob: ec61e012d286ed799eb0720b9bb1c1b7d7ed83cc (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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