Write a program to print the following pattern based on user input.
For eg: If N=4 the code should print the following pattern.
1*2*3*4*17*18*19*20
--5*6*7*14*15*16
----8*9*12*13
------10*11
Again if N=5 the code should print
1*2*3*4*5*26*27*28*29*30
--6*7*8*9*22*23*24*25
----10*11*12*19*20*21
------13*14*17*18
--------15*16
For N=2 the pattern will be
1*2*5*6
--3*4
PLEASE HELP AS SOON AS POSSIBLE.
----8*9*12*13
------10*11
SUBHENDU_1
0
Newbie Poster
Recommended Answers
Jump to PostPLEASE HELP AS SOON AS POSSIBLE.
Please read our rules as soon as possible. Thanks.
Jump to PostFurther to the above Posting Pro @ Schol-R-LEA comments ...
and since ... the meaning to be helpful @ Aditya_13 ...
posted his first code here ...please also note these comments that are also meant to be helpful to, now especially, @ Aditya_13 ...
Please take a look at …
All 5 Replies
deceptikon
1,790
Code Sniper
Team Colleague
Featured Poster
Aditya_13
0
Newbie Poster
Schol-R-LEA
1,446
Commie Mutant Traitor
Featured Poster
David W
131
Practically a Posting Shark
David W
131
Practically a Posting Shark
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.