![]() |
Given the number of rows and columns, print the corresponding swastika pattern using loops. Note: The number of rows and columns should be the same and an odd number. This will generate a perfect swastika pattern. Examples : Input : row = 7, column = 7 Output: * * * * * * * * * * * * * * * * * * * * * * * * * Input : row = 11, column = 11 Output : * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Recommended: Please try your approach on {IDE} first, before moving on a solution. Below is the implementation to print the swastika pattern. C++
Javascript
Output: * * * * * * * * * * * * * * * * * * * * * * * * * Time Complexity: O(row * col), where row and col represents the given number of rows and columns. |
Reffered: https://www.geeksforgeeks.org
C++ Programs |
Type: | Geek |
Category: | Coding |
Sub Category: | Tutorial |
Uploaded by: | Admin |
Views: | 9 |