jeudi 13 octobre 2016

How to print this pattern in C/C++, java?

how can i print this pattern . Even providing algorithm would help. or atleast describe how to print this type of pattern. for n=5 the output should be:

1*2*3*4*5*26*27*28*29*30
--4*5*6*7*22*23*24*25
---8*9*10*19*29*21
----11*12*17*18
-----13*19
------20
   Thanks in advance.

Aucun commentaire:

Enregistrer un commentaire