summaryrefslogtreecommitdiff
path: root/BlankConsoleLab/BlankConsoleLab.cpp
blob: 3dc248d37b40265dca3fda8e8ba6bb20c768e57d (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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#include <iostream>
#include <limits>
#include <iomanip>
using std::cout;
using std::cin;
using std::endl;

int main()
{
    float Width;
    float Length;
    float Area;
    float Area2;
    float aspectr;
    float Mass;

    //collects width of kite in centimeter also checks if it is in bounds
    cout << "What is the Width of your kite in centimeters? ";
    cin >> Width;

    if (Width < 1 || Width > 400)
    {
        cout << endl << "Input is too large, please enter a number between 1-400" << endl;
        cin.ignore(99, '\n');
        return 1;
    }

    //collects length of kite in centimeter also checks if it is in bounds
    cout << "What is the Length of your kite in centimeters? ";
    cin >> Length;
    if (Length < 1 || Length > 400)
    {
        cout << "Input is too large, please enter a number between 1-400" << endl;
        cin.ignore(99, '\n');
        return 1;
    }

    //equation for area in centimeters then convert to meters
    Area = (Width * Length) / 2;
    Area2 = Area / 10000;
    aspectr = Width / Length;


    cout << "Area in Meters = " << Area2 << endl;

    cout << "Aspect Ratio = " << aspectr << endl;

    //displays aspect ratio depending size
    if (aspectr >= 1)
        cout << "Your Aspect Ratio is greater than 1,\
 lower aspect ratio would provide more stability" << endl;

    else if (aspectr < 1)
        cout << "Your Aspect Ratio is less than 1, Good!" << endl;

    //calculates the gravitational pull on the kite
    Mass = Area2 * 135;
        cout << "The gravitational pull on your kite is =" << Mass << "Grams" << endl;



    return 0;
}