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