summaryrefslogtreecommitdiff
path: root/BlankConsoleLab/BlankConsoleLab.cpp
blob: d6dde49a53b626cb509a55e9f878300593df4c48 (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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
// BlankConsoleLab.cpp : This file contains the 'main' function. Program execution begins and ends there.
//

#include <iostream>

using namespace std;

using std::cout;
using std::cin;
using std::endl;

    //Variables used in the programming.
    float width;
    float length;
    float Area;
    float aspectR;
    float Mass;

    float graPull;

int main()
{


    //Welcome Message
    cout << "Hello welcome to the Kite App" << endl << endl;

        cout << "Please enter your kite's width in CM "<< endl;
        cin >> width;
        while (width < 1 || width > 400)
        {
            cout << "Please enter your kite's width in CM " << endl;
            cin >> width;
        }

    //Enter Width and Length in centimeters
        cout << "Please Enter your kite's length in CM " << endl;
        cin >> length;
    while (length < 1 || length > 400)
    {
        cout << "Please Enter your kite's length in CM " << endl;
        cin >> length;
    }

    //Output the measures entered by user
    cout << "Your kite Measurements is ";
    cout << width;
    cout << " By "; 
    cout <<length << endl;

    //Area is calculated and converted to square meters.
    
    //Area calculation
    Area = (width * length) / 2;

    //Conversion calculation to square meters.
    Area = Area / 10000;

    //Output of the area calculation to square meters.
    cout << "The area of the kite in squre meter is ";
    cout << Mass;
    cout << " Square Meters" <<endl;
    //Aspect Ratio 
    aspectR = width / length;

    cout << "The aspect ratio of your kite is ";
    cout << aspectR << endl;
    if (aspectR >= 1)
    {
        cout << "Keep in mind, a lower aspect ratio would provide more stability";
    }

    Mass = Area * 135 / 1000;

    graPull = Mass * 9.8;

    cout << "Your Kite Weighs: " <<endl;
}