blob: aee867618edd7efbf0e98f9bb52f19c9c0f53606 (
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>
using namespace std;
using std::cout;
using std::cin;
using std::endl;
int main()
{
float width, length;
cout << "Enter the width of the kite in meters." << endl;
cin >> width;
cout << "Enter the length of the kite in meters." << endl;
cin >> length;
cout << "You have entered " << width << " for width." << endl;
cout << "You have entered " << length << " for length." << endl;
float ratio = (width / length);
if (ratio >= 1)
{
cout << "WARNING: A lower aspect ratio will provide more stability." << endl;
}
float areacm = (width * length/2);
float areamt = (areacm / 10000);
cout << "The area of the kite in square meters is " << areamt << endl;
}
|