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

#include <iostream>
#include <iomanip>

using namespace std;

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

float width;
float length;
float area;
float sqmarea;
float aspectratio;

int main()
{

    cout << "Insert Kite width: " << endl;
    cin >> width ;

    cout << "Insert Kite length: " << endl;
    cin >> length ;

    cout << "Our kite has a width of " << width << " and a length of " << length << " both measured in cm." << endl;

    float area = width * length;

    cout << " Our kite has an area of " << area << " in cm^2." << endl;

    float sqmarea = area / 10000;

    cout << " Our area in square meters is " << sqmarea << endl;

    float aspectratio = width / length;

    cout << fixed << setprecision(2) << " Our kite has an aspect ratio of " << aspectratio << endl;

    if (aspectratio >= 1)
    {
        cout << "A lower aspect ratio my result in better stability in our kite" << endl;
    }
}