diff options
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; |