summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTaylor Rogers <[email protected]>2022-10-17 09:10:40 -0700
committerTaylor Rogers <[email protected]>2022-10-17 09:10:40 -0700
commit16b5149a0cab905240a57eacc46a9eb05b8dfc6d (patch)
treec8e36b691c63a0d709993755f031f736a415f27f
parentAdded length Qeustions (diff)
downloadcst116-lab1-taylorrog-16b5149a0cab905240a57eacc46a9eb05b8dfc6d.tar.xz
cst116-lab1-taylorrog-16b5149a0cab905240a57eacc46a9eb05b8dfc6d.zip
Added area variables
-rw-r--r--BlankConsoleLab/BlankConsoleLab.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/BlankConsoleLab/BlankConsoleLab.cpp b/BlankConsoleLab/BlankConsoleLab.cpp
index 6eec2a7..c6e35d5 100644
--- a/BlankConsoleLab/BlankConsoleLab.cpp
+++ b/BlankConsoleLab/BlankConsoleLab.cpp
@@ -14,12 +14,21 @@ int main()
{
int kwidth, klength;
- cout << "What is the width of the kite in centimeters?: ";
+ 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;
}