Skip to content

Latest commit

 

History

History
33 lines (25 loc) · 645 Bytes

File metadata and controls

33 lines (25 loc) · 645 Bytes

Program ID - 3615 Vertical-Zig-Zag-Pattern - Skillrack

Fill in the missing lines of code to print the pattern as defined in the Example Input/Output section.

Input Format:
The first line contains N.

Output Format:
N lines contain the number pattern.

Boundary Conditions:
1 <= N <= 50

Example Input/Output 1:
Input:
5

Output:
1
2 9  
3 8 10
4 7 11 14
5 6 12 13 15

Example Input/Output 2:
Input:
4

Output:
1
2 7
3 6 8
4 5 9 10