summaryrefslogtreecommitdiff
path: root/BlankConsoleLab/BlankConsoleLab.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'BlankConsoleLab/BlankConsoleLab.cpp')
-rw-r--r--BlankConsoleLab/BlankConsoleLab.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/BlankConsoleLab/BlankConsoleLab.cpp b/BlankConsoleLab/BlankConsoleLab.cpp
index 9cf1e55..2619b7b 100644
--- a/BlankConsoleLab/BlankConsoleLab.cpp
+++ b/BlankConsoleLab/BlankConsoleLab.cpp
@@ -17,9 +17,12 @@ float w, l, area, aspect_ratio;
int main()
{
//Collecting the length and width of the kite in centimeters
- while !(w >= 1)
- cout << "Please input the width of the kite in centimeters." << endl;
+ 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.";
+ cin >> w;
+ }
cout << "Now please input the length of the kite in centimeters." << endl;
cin >> l;