blob: fca81a9f5adc79614997d5bce28315fe16614d15 (
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
40
41
|
#include <iostream>
using namespace std;
int main()
{
int width, length;
float area, ratio;
cout << "Kite Math 0.2" << endl;
do {
cout << "Input the width of your kite:" << endl;
cin >> width;
if (width < 1 || width > 400)
cout << "Input a valid number." << endl;
cout << endl;
} while (width < 1 || width > 400);
do {
cout << "Input the length of your kite:" << endl;
cin >> length;
if (length < 1 || length > 400)
cout << "Input a valid number." << endl;
cout << endl;
} while (length < 1 || length > 400);
cout << "Width: " << width << endl;
cout << "length: " << length << endl;
area = (width * length) / 2;
area = area / 10000;
ratio = width / length;
cout << "Ratio: " << ratio << endl;
if (ratio >= 1) {
cout << "A lower aspect ratio may provide more kit stability" << endl;
}
}
|