Website Summary Files Commits Branches @commit @diff @stats
path: root / Sem. 03 / solutions / exercise 9 - rightmost pyramid.cpp
diff options
context:
space:
mode:
Commit4eb49067c08480fa0b435e6969655e142b71600d (patch)
Author
 Angel Dimitriev <achi_d@abv.bg>
2021-10-28 10:51:36 -0400
Committer
 GitHub <noreply@github.com>
2021-10-28 10:51:36 -0400
Filesbb251b2da3ba834b4100387816a4775ac6a76ab6 /Sem. 03/solutions/exercise 9 - rightmost pyramid.cpp
Introduction_to_programming_FMI-4eb49067c08480fa0b435e6969655e142b71600d.tar
Introduction_to_programming_FMI-4eb49067c08480fa0b435e6969655e142b71600d.tar.gz
Introduction_to_programming_FMI-4eb49067c08480fa0b435e6969655e142b71600d.zip
Parent235bbe2ccc3565f8af02f9cddd76b8937f6dff33 (diff)
Rename exercise 9 - rightmost pyramid.cpp to exercise 09 - rightmost pyramid.cpp
1 files changed, 0 insertions, 36 deletions
-rw-r--r--Sem. 03/solutions/exercise 9 - rightmost pyramid.cpp36
diff --git a/Sem. 03/solutions/exercise 9 - rightmost pyramid.cpp b/Sem. 03/solutions/exercise 9 - rightmost pyramid.cpp
deleted file mode 100644
index d1b339a..0000000
--- a/Sem. 03/solutions/exercise 9 - rightmost pyramid.cpp
+++ /dev/null
@@ -1,36 +0,0 @@
-#include <iostream>
-using namespace std;
-
-int main()
-{
-
- int n;
- cin >> n;
-
- // print the first part of the pyramid (the one going from 1 to n(n-1)...21)
-
- for(int i = 1; i <= n; i++)
- {
- for(int k = n - i - 1; k >= 0; k--)
- cout << " "; // print the spaces
-
- for(int j = i; j >= 1; j--)
- cout << j; // print numbers j(j - 1)...21
-
- cout << endl;
- }
- // print the second part of the pyramid (the one going from (n-1)...21 to 1
-
- for(int i = n - 1; i >= 1; i--)
- {
- for(int k = n - i - 1; k >= 0; k--)
- cout << " ";
-
- for(int j = i; j >= 1; j--)
- cout << j;
-
- cout << endl;
- }
-
- return 0;
-} \ No newline at end of file