My Hourglass

0

0 votes
Problem

WAP to create an hourglass with rows=user-defined.

Creating a pattern with size 2 X rows, consisting each half of hourglass with size=rows, with upper half made of stars and lower half made of numbers with star to the right of each number and increamenting while reaching its center on each row.

(The ouput doesnt seem aligned in ques, please check the given test cases)

e.g. INPUT

3

OUTPUT 

* * * * *
  * * *
    *
    1*
  2*3*2*
3*4*5*4*3*

Time Limit: 9
Memory Limit: 256
Source Limit:
Editor Image

?