diff options
| author | Taylor Rogers <[email protected]> | 2022-10-17 09:10:40 -0700 |
|---|---|---|
| committer | Taylor Rogers <[email protected]> | 2022-10-17 09:10:40 -0700 |
| commit | 16b5149a0cab905240a57eacc46a9eb05b8dfc6d (patch) | |
| tree | c8e36b691c63a0d709993755f031f736a415f27f /BlankConsoleLab/BlankConsoleLab.cpp | |
| parent | Added length Qeustions (diff) | |
| download | cst116-lab1-taylorrog-16b5149a0cab905240a57eacc46a9eb05b8dfc6d.tar.xz cst116-lab1-taylorrog-16b5149a0cab905240a57eacc46a9eb05b8dfc6d.zip | |
Added area variables
Diffstat (limited to 'BlankConsoleLab/BlankConsoleLab.cpp')
| -rw-r--r-- | BlankConsoleLab/BlankConsoleLab.cpp | 11 |
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; } |