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

#include <iostream>

using namespace std;

int GetArea(int length, int width);

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

int main()
{
    int length;
    int width;
    int correct = 0;
    float area;
    while (correct == 0) {
        cout << "How long is your kite in centimeters? ";
        cin >> length;
        cout << endl << "How wide is your kite in centimeters? ";
        cin >> width;
        cout << endl << "Your kite is " << length << "cm long and " << width << "cm wide? 1=Yes/ 0=No ";
        cin >> correct;
        cout << endl;
    }
    cout << "Calculating area in square meters..." << endl;
    area = (length * width) / 2.0;
    area = area / 10000;
    cout << "Your Kite's area is " << area << "meters squared.";

    

}