|
|
#1 |
|
Solid State Member
Join Date: Feb 2011
Posts: 14
|
I want to print a pattern in which pattern moves in clockwise direction.
21 22 23 24 25 20 7 8 9 10 19 6 1 2 11 18 5 4 3 12 17 16 15 14 13 Plz help |
|
|
|
|
|
#2 |
|
Baseband Member
Join Date: Jun 2005
Posts: 58
|
The best way to accomplish this is to first generate a 2D array (which would be 5x5 for your example). Then run a loop similar to the following:
set start position in array for n = 25 to 1 set array element at position to n move postion if moved position is off the array (you hit an edge) or it already has a number unmove position change direction move position endif endfor print array Could use a little refinement (the logic is kinda ugly), but should get the job done.
__________________
All the world's a computer, and all the men and women merely AI agents... |
|
|
|
|
|
#3 |
|
Solid State Member
Join Date: Jul 2011
Posts: 8
|
Hi, Bucky24
I need your help if you don't mind. I need to know how can I get the code of alphabetic keys and numeric key. and also print them with digit or number. thanks |
|
|
|
|
|
#4 |
|
Baseband Member
Join Date: Jun 2005
Posts: 58
|
Please create a new topic instead of thread-jacking this one, then PM me the link to it.
__________________
All the world's a computer, and all the men and women merely AI agents... |
|
|
|
|
|
#5 |
|
Solid State Member
Join Date: Jul 2011
Posts: 8
|
Hi, Bucky24
Very nice to again. Forget the last one,, just tell me the difference between Turbo C and Bore land C. Both are used for same purpose. |
|
|
|
|
|
#6 |
|
Baseband Member
Join Date: Jun 2005
Posts: 58
|
As far as I know they are the same thing.
__________________
All the world's a computer, and all the men and women merely AI agents... |
|
|
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|