Website Summary Files Commits Branches @commit @diff @stats
diff options
context:
space:
mode:
Commit0901d0e587a4fd820d54dac9dca9477dff3b8670 (patch)
Author
 Kristian Todorov <63777932+kristian3551@users.noreply.github.com>
2021-10-28 17:07:57 +0300
Committer
 Kristian Todorov <63777932+kristian3551@users.noreply.github.com>
2021-10-28 17:07:57 +0300
Filesffb99816477594d9c99b9d86c4a69d5b95a4a987
Introduction_to_programming_FMI-0901d0e587a4fd820d54dac9dca9477dff3b8670.tar
Introduction_to_programming_FMI-0901d0e587a4fd820d54dac9dca9477dff3b8670.tar.gz
Introduction_to_programming_FMI-0901d0e587a4fd820d54dac9dca9477dff3b8670.zip
Parent2f718a73d9226759f98d7d631f0d43ba180c5919 (diff)
fixed styling and spacing of ex 9
1 files changed, 2 insertions, 2 deletions
-rw-r--r--Sem. 03/solutions/exercise 9 - rightmost pyramid.cpp4
diff --git a/Sem. 03/solutions/exercise 9 - rightmost pyramid.cpp b/Sem. 03/solutions/exercise 9 - rightmost pyramid.cpp
index e95fa25..d1b339a 100644
--- a/Sem. 03/solutions/exercise 9 - rightmost pyramid.cpp
+++ b/Sem. 03/solutions/exercise 9 - rightmost pyramid.cpp
@@ -11,7 +11,7 @@ int main()
for(int i = 1; i <= n; i++)
{
- for(int k = n - i; k >= 0; k--)
+ for(int k = n - i - 1; k >= 0; k--)
cout << " "; // print the spaces
for(int j = i; j >= 1; j--)
@@ -23,7 +23,7 @@ int main()
for(int i = n - 1; i >= 1; i--)
{
- for(int k = n - i; k >= 0; k--)
+ for(int k = n - i - 1; k >= 0; k--)
cout << " ";
for(int j = i; j >= 1; j--)