From 39cbfda611bdc401f83a54ce35a1b2ded75c5e71 Mon Sep 17 00:00:00 2001 From: alexandra-apetroaei Date: Tue, 18 Oct 2022 14:02:22 -0800 Subject: part 2 --- BlankConsoleLab/Lab1-Apetroaei.cpp | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/BlankConsoleLab/Lab1-Apetroaei.cpp b/BlankConsoleLab/Lab1-Apetroaei.cpp index a45d674..c7dbbac 100644 --- a/BlankConsoleLab/Lab1-Apetroaei.cpp +++ b/BlankConsoleLab/Lab1-Apetroaei.cpp @@ -9,6 +9,12 @@ using std::cout; using std::cin; using std::endl; +void keepKite(int width, int length) +{ + if (length < 1 && >400) + cout << "Enter new number!" << endl; +} + int main() { float width; @@ -20,19 +26,15 @@ int main() while (isStable == false) { + cout << "Insert width (in centimeters): " << endl; cin >> width; cout << "Insert length (in centimeters): " << endl; cin >> length; - else if (number >= 1 || <= 400) - { - cout << "Invalid input: Please enter a number between 1 and 400." << endl; - } - cout << "You entered: " << width << "cm for width, and " << length << "cm for length" << endl; - + // Area formula area = ((width * length) / 2) / 1000; @@ -42,7 +44,7 @@ int main() if (aspect_ratio >= 1) { - cout << "Warning: " << aspect_ratio << "is too high and should be lowered to provie stability! " << endl; + cout << "Warning: " << aspect_ratio << " is too high and should be lowered to provie stability! " << endl; } @@ -50,9 +52,6 @@ int main() { cout << "Aspect ratio:" << aspect_ratio << endl; } - - - return 0; } -- cgit v1.2.3