From 0901d0e587a4fd820d54dac9dca9477dff3b8670 Mon Sep 17 00:00:00 2001 From: Kristian Todorov <63777932+kristian3551@users.noreply.github.com> Date: Thu, 28 Oct 2021 17:07:57 +0300 Subject: fixed styling and spacing of ex 9 --- Sem. 03/solutions/exercise 9 - rightmost pyramid.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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--) -- cgit v1.3.1-23-gd82d