diff options
Fixed name and missing spaces between keyword and bracket on exercise 11
1 files changed, 2 insertions, 2 deletions
| -rw-r--r-- | Sem. 03/Solutions/11. Spiral_Numbers_2.cpp (renamed from Sem. 03/Solutions/11.Spiral_Numbers_2.cpp) | 4 |
diff --git a/Sem. 03/Solutions/11.Spiral_Numbers_2.cpp b/Sem. 03/Solutions/11. Spiral_Numbers_2.cpp index 3ff0f16..f6bc2d4 100644 --- a/Sem. 03/Solutions/11.Spiral_Numbers_2.cpp +++ b/Sem. 03/Solutions/11. Spiral_Numbers_2.cpp @@ -7,7 +7,7 @@ int main() int n; cin >> n; - for(int i = 0, previous = 0; i < n; i++) + for (int i = 0, previous = 0; i < n; i++) { int modifier = 1; if (i % 2 == 1) @@ -16,7 +16,7 @@ int main() modifier = -1; } - for(int j = 0; j < n; j++) + for (int j = 0; j < n; j++) cout << (previous += modifier) << " "; cout << endl; |
