From f51185d90bfe76d1fef272fe449c1d3d3bb89528 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Wed, 3 Nov 2021 21:15:51 +0200 Subject: Made some minor formatting and style changes to improve readability --- Sem. 03/Solutions/15. Bowtie.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'Sem. 03/Solutions/15. Bowtie.cpp') diff --git a/Sem. 03/Solutions/15. Bowtie.cpp b/Sem. 03/Solutions/15. Bowtie.cpp index 31ca6e7..61c5df3 100644 --- a/Sem. 03/Solutions/15. Bowtie.cpp +++ b/Sem. 03/Solutions/15. Bowtie.cpp @@ -11,11 +11,13 @@ int main() { { int absI = (i < 0) ? -i : i, diff = n - absI; - /* Numbers on the left */ + // Numbers on the left + for (int j = 1; j <= diff; j++) cout << j << " "; - /* Spaces/Line in the middle */ + // Spaces/Line in the middle + if (i == 0) middleSpacer = '-'; @@ -25,7 +27,8 @@ int main() { if (i == 0) middleSpacer = ' '; - /* Number on the right */ + // Number on the right + for (int j = diff; j > 0; j--) cout << " " << j; -- cgit v1.3.1-23-gd82d