summaryrefslogtreecommitdiff
path: root/CST116-lab1-Crombie-pseudocode.txt
blob: 07b91e9549f7060e0e37b0382931c14c67fbc60c (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
33
34
35
36
37
38
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