diff options
| author | [email protected] <[email protected]> | 2022-10-05 16:21:28 -0700 |
|---|---|---|
| committer | [email protected] <[email protected]> | 2022-10-05 16:21:28 -0700 |
| commit | c07b3e36d13009e6e8a45a30fb62f50250f35f6e (patch) | |
| tree | de310dce53be3b26f13063b093689febdeda688b /BlankConsoleLab/BlankConsoleLab.cpp | |
| parent | Push 5 (diff) | |
| download | cst116-lab1-smith-c07b3e36d13009e6e8a45a30fb62f50250f35f6e.tar.xz cst116-lab1-smith-c07b3e36d13009e6e8a45a30fb62f50250f35f6e.zip | |
Push 6
Diffstat (limited to 'BlankConsoleLab/BlankConsoleLab.cpp')
| -rw-r--r-- | BlankConsoleLab/BlankConsoleLab.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/BlankConsoleLab/BlankConsoleLab.cpp b/BlankConsoleLab/BlankConsoleLab.cpp index 2619b7b..3167a0e 100644 --- a/BlankConsoleLab/BlankConsoleLab.cpp +++ b/BlankConsoleLab/BlankConsoleLab.cpp @@ -20,11 +20,15 @@ int main() cout << "Please input the width of the kite in centimeters." << endl; cin >> w; while (w < 1 || w > 400) { - cout << "That number is invalid. Please try again with a number between 1 and 400."; + cout << "That number is invalid. Please try again with a number between 1 and 400." << endl; cin >> w; } cout << "Now please input the length of the kite in centimeters." << endl; cin >> l; + while (l < 1 || l > 400) { + cout << "That number is invalid. Please try again with a number between 1 and 400." << endl; + cin >> l; + } //Doing the math to convert the centimeter inputs to square meter outputs area = (w * l) / 2; |