aboutsummaryrefslogtreecommitdiff
path: root/week03/exercise02.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'week03/exercise02.cpp')
-rw-r--r--week03/exercise02.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/week03/exercise02.cpp b/week03/exercise02.cpp
new file mode 100644
index 0000000..dd301e8
--- /dev/null
+++ b/week03/exercise02.cpp
@@ -0,0 +1,12 @@
+#include <iostream>
+
+int main() {
+ int x;
+ std::cin >> x;
+ for (int row = 0; row < x; row++) {
+ for (int col = 0; col <= row; col++) {
+ std::cout << '#';
+ }
+ std::cout << std::endl;
+ }
+}