aboutsummaryrefslogtreecommitdiff
path: root/CST116F2021-Lab3/CST116F2021-Lab3.cpp
diff options
context:
space:
mode:
authorWiserJ <[email protected]>2021-10-19 15:39:29 -0700
committerWiserJ <[email protected]>2021-10-19 15:39:29 -0700
commita11bfbcdb41d594d683753089205233f141b1605 (patch)
tree21a0f7ff18795a7f30c33a7bd61c921fc4ab6aae /CST116F2021-Lab3/CST116F2021-Lab3.cpp
parentb (diff)
downloadcst116-lab3-jeffwoit-a11bfbcdb41d594d683753089205233f141b1605.tar.xz
cst116-lab3-jeffwoit-a11bfbcdb41d594d683753089205233f141b1605.zip
p.184
Diffstat (limited to 'CST116F2021-Lab3/CST116F2021-Lab3.cpp')
-rw-r--r--CST116F2021-Lab3/CST116F2021-Lab3.cpp27
1 files changed, 25 insertions, 2 deletions
diff --git a/CST116F2021-Lab3/CST116F2021-Lab3.cpp b/CST116F2021-Lab3/CST116F2021-Lab3.cpp
index 31d592e..7db63d6 100644
--- a/CST116F2021-Lab3/CST116F2021-Lab3.cpp
+++ b/CST116F2021-Lab3/CST116F2021-Lab3.cpp
@@ -7,9 +7,32 @@ using namespace std;
int main()
{
+ //p.184
+
+ int length = 0;
+ int height = 1;
+
+ cout << "Please input the base length of your triangle: ";
+ cin >> length;
+
+ height = length;
+ do {
+ do
+ {
+ cout << '*';
+ length = length--;
+ } while (length != 0);
+ cout << "\n";
+ height = height--;
+ length = height;
+ } while (height != 0);
+
+ return 0;
+
+
//p.179
- int input = 0;
+ /*int input = 0;
int remainder = 0;
cout << "Please enter an integer between 1 and 50: ";
@@ -33,7 +56,7 @@ int main()
input = input - 2;
} while (input != 0);
- return 0;
+ return 0;*/