blob: c6e35d5b5bcf6610d29dfcb10110970d102abe0f (
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
|
// 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;
int main()
{
int kwidth, klength;
cout << "What is the width of the kite in centimeters?: ";
cin >> kwidth;
cout << endl;
cout << "What is the length of the kite in centimeters? ";
cin >> klength;
int karea = (kwidth * klength) / 2;
int ksqm = karea / 10000;
cout << "The kite is " << kwidth << " centimeters wide and " << klength << " centimeters long." << endl;
cout << endl;
cout << "The kite has an area of " << ksqm << " square meters." << endl;
}
|