From 16b5149a0cab905240a57eacc46a9eb05b8dfc6d Mon Sep 17 00:00:00 2001 From: Taylor Rogers Date: Mon, 17 Oct 2022 09:10:40 -0700 Subject: Added area variables --- BlankConsoleLab/BlankConsoleLab.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'BlankConsoleLab/BlankConsoleLab.cpp') 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; } -- cgit v1.2.3