mardi 28 avril 2020

How to draw pattern using Java according to a given number [closed]

I am trying to write a program that draws the following pattern depending on an input number: exampe: input:
3 result:
0****1
23**45
678901

ex: imput:
5:
Result:
0********1
23******45
678****901
2345**6789
0123456789

just to be clear: The input number represents how many rows, and multiplicating the input by 2 is the number of the digits. the (*) should separate 2 digits in the first raw and then 4 digits in the second, etc...

Thank you all in advance

Aucun commentaire:

Enregistrer un commentaire