blob: 0e95bdd1a5c8f1b8842a40128755a16ed236fe7d (
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
|
const float MASSPERSQUAREMETER = 0.135
main(){
float length
float width
bool leave = false
while(!leave){
print("Please enter the length, then width of the kite in centimeters.")
input(length)
input(width)
if (1 <= width && width <= 400 && 1 <= length && length <= 400){
leave = true
}
}
float area = (length * width) / 2
area = area / 10000
float aspectratio = width / length
if (aspectratio >= 1){
print("Warning: a lower aspect ratio will provide more stability.")
}
float mass = MASSPERSQUAREMETER * area
float gravitationalPull = mass * 9.8
print("Length of the kite " + length + "cm.")
print("Width of the kite " + width + "cm.")
print("Area of the kite " + area + "m^2.")
}
|