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

#include <iostream>

using namespace std;

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

const float MASSPERSQUAREMETER = 0.135;

int main()
{
    float length;
    float width;
    bool leave = false;
    while (!leave) {
        cout << "Please enter the length, then width of the kite in centimeters" << endl;
        cin >> length;
        cin >> 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) {
        cout << "Warning: a lower aspect ratio (width / length) will provide more stability" << endl;
    }
    float mass = MASSPERSQUAREMETER * area;
    float gravitationalPull = mass * 9.8;

    cout << "The length of the kite is " << length << "cm." << endl;
    cout << "The width of the kite is " << width << "cm." << endl;
    cout << "The area of the kite is " << area << "m^2." << endl;
    cout << "The mass of the kite is " << mass << "kg." << endl;
    cout << "The gravitational pull on the kite is " << gravitationalPull << "Newtons" << endl;

}