summaryrefslogtreecommitdiff
path: root/BlankConsoleLab/BlankConsoleLab.cpp
blob: e80106cf4f8a1a71c88fe06c09bdbc11210a6366 (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
// BlankConsoleLab.cpp : This file contains the 'main' function. Program execution begins and ends there.
//

#include <iostream>

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

int main()
{
    int width;
    int length;
    float areaCM;
    float areaM;
    float ratio;

    cout << "Please enter the length of your kite." << endl;
    cin >> length;

    cout << "\nPlease enter the width of your kite." << endl;
    cin >> width;
    cout << "\n";

    areaCM = (width * length) / 2;
    areaM = areaCM / 10000;
    ratio = width / length;

    if (ratio >= 1)
    {
        cout << "WARNING: A lower aspect ratio \nwill provide more stability!\n" << endl;
    }

    cout << "Your kite has an area of: " << areaM << " square meters" << endl;
    cout << "Your kite has an area of: " << areaCM << " square centimeters" << endl;
}