in the master course for dsa using c++ under section challenges - getting started with programming - 2 their is a challenge called pattern magic
we will be given input in the format like N=5
and then we have to print a pattern
like for N = 5 is
their are total 9 rows
row 1 there are 9 * s and no space,
row2 4 * then 1 space then 4* again,
row3 3 * then 3 space then 3* again,
row4 2 * then 5 space then 2* again,
row5 1 * then 7 space then 1* again,
row6 2 * then 5 space then 2* again,
row7 3 * then 3 space then 3* again,
row8 4 * then 1 space then 4* again,
row2 9 * then 0 space.