summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralexandra-apetroaei <andra@MSI>2022-10-18 14:02:22 -0800
committeralexandra-apetroaei <andra@MSI>2022-10-18 14:02:22 -0800
commit39cbfda611bdc401f83a54ce35a1b2ded75c5e71 (patch)
treedc7a81427c6becb0bd717ff7c0e6227c9b1e0148
parentpart 2 (diff)
downloadcst116-lab1-alexandra-apetroaei-39cbfda611bdc401f83a54ce35a1b2ded75c5e71.tar.xz
cst116-lab1-alexandra-apetroaei-39cbfda611bdc401f83a54ce35a1b2ded75c5e71.zip
part 2
-rw-r--r--BlankConsoleLab/Lab1-Apetroaei.cpp19
1 files 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;
}