blob: e83e6f9e05c0abd1b5a4ecc165f2d86b5f50be77 (
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
|
// 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;
int main()
{
//Variables used in the programming.
float width;
float length;
float Area;
float aspectR;
//Welcome Message
cout << "Hello welcome to the Kite App" << endl << endl;
//Enter Width and Length in centimeters
cout << "Please enter your kite's width in CM "<< endl;
cin >> width;
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 << Area;
cout << " Square Meters" <<endl;
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";
}
}
|