PROGRAM TO PRINT SWASTIKA PATTERN

4.5

4 votes
Hard
Problem

Given the number of rows and columns, print the corresponding swastika pattern.


Note : 

  • The number of rows and columns should be same and an odd number.
  • This will generate a perfect swastika pattern.
  • The input contains row and column limits.
Input : 
7
7        
Output:
*     * * * *
*     *
*     *
* * * * * * *
      *     *
      *     *
* * * *     *
 
Input : 
11
11
Output :
*         * * * * * *
*         *
*         *
*         *
*         *
* * * * * * * * * * * 
          *         * 
          *         * 
          *         * 
          *         * 
* * * * * *         * 
Time Limit: 5
Memory Limit: 256
Source Limit:
Editor Image

?