From baa84bc3223bf6b7276eaba62381aec325c31c24 Mon Sep 17 00:00:00 2001 From: "smithbenjamin2022@gmail.com" Date: Wed, 5 Oct 2022 16:19:33 -0700 Subject: Push 5 --- BlankConsoleLab/BlankConsoleLab.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'BlankConsoleLab/BlankConsoleLab.cpp') 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; -- cgit v1.2.3