Print the pattern
Submissions: 645   Accuracy:

39.24%

  Difficulty: Easy   Marks: 2

Write a program that receives a number as input and prints it in the following format as shown below.
Examples:

Input : n = 3

Output :

1*2*3*10*11*12
--4*5*8*9
----6*7

Input : n = 4

Output :

1*2*3*4*17*18*19*20
--5*6*7*14*15*16
----8*9*12*13
------10*11

Input:
The first line consists of an integer T i.e number of test cases. The first and only line of each test case consists of an integer n

Output:
Print the required output as a pattern a given in examples.

Constraints: 
1<=T<=100
1<=n<=70

Example:
Input:

1
3

Output:
1*2*3*10*11*12

--4*5*8*9

----6*7

** For More Input/Output Examples Use 'Expected Output' option **

Contributor: Saksham Ashtputre
Author: support3


If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.



Need help with your code? Please use ide.geeksforgeeks.org, generate link and share the link here.


to report an issue on this page.