Summary Files Commits Branches @commit @diff @stats
path: root / Year 1 / Programming introduction / Solutions Sem. 03 / 08. Triangle.cpp
diff options
context:
space:
mode:
1 files changed, 17 insertions, 0 deletions
-rw-r--r--Year 1/Programming introduction/Solutions Sem. 03/08. Triangle.cpp17
diff --git a/Year 1/Programming introduction/Solutions Sem. 03/08. Triangle.cpp b/Year 1/Programming introduction/Solutions Sem. 03/08. Triangle.cpp
new file mode 100644
index 0000000..fa2b501
--- /dev/null
+++ b/Year 1/Programming introduction/Solutions Sem. 03/08. Triangle.cpp
@@ -0,0 +1,17 @@
+#include <iostream>
+
+using namespace std;
+
+int main()
+{
+ int n;
+ cin >> n;
+
+ for (int row = 1; row <= n; row++)
+ {
+ for (int col = 0; col < row; col++)
+ cout << "$ ";
+
+ cout << endl;
+ }
+}