summaryrefslogtreecommitdiff
path: root/BlankConsoleLab/CST116-Lab1-PsuedoCode-Havaldar.txt
blob: 427b54cd97541ffccf99d3b63dc585152f38a73a (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
Start Program

Initialize float variables length, width, area, aspectRatio, mass, and gPull
Initialize boolean variables glength and gwidth as false

While glength is false
	Ask user for length of kite and store input as length
	If length is not between 1-400
		ask user to input length again
	else
		set glength to true
		break loop

While gwidth is false
	Ask user for width of kite and store input as length
	If width is not between 1-400
		ask user to input width again
	else
		set gwidth to true
		break loop

Output the width and the length of the kite

set area equal to width multiplied by length and divide the product by 2
Divide area by 10000

Output area of kite in square meters to user

set aspectRatio equal to width divided by length

If aspectRatio is greater or equal to 1
	tell user that a aspect ratio under 1 would provide more stability

set mass equal to area multiplied by 135 and divide product by 1000

set gPull equal to mass multiplied by 9.8

output gPull to user as weight of kite