jeudi 23 avril 2020

To print below hollow pattern of given dimension on basis of input

Input Format

rows = 6, columns = 20;

Constraints

n>0

Output Format

image

Sample Input 0

6 20

Sample Output 0

           ********************
           *                  *
           *                  *
           *                  *
           *                  *
           ********************

Sample Input 1

8

8

Sample Output 1

          ********
          *      *
          *      *
          *      *
          *      *
          *      *
          *      *
          ********

Sample Input 2

8 8

Sample Output 2

      ********
      **    **
      * *  * *
      *  **  *
      *  **  *
      * *  * *
      **    **
      ********

Aucun commentaire:

Enregistrer un commentaire