473,396 Members | 2,026 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

SPIRAL PROBLEMS


Hello Everyone.
Can some one help me on this question , I studied a lot but still am unable
to do this
I need to print the following pattern using recursion in C++ , the end term
is ' n ' selected
by the user. I hope so someone can do this here.
Byes.
The PATTERN IS
. 10 11 12 13
. 9 2 3 14
23 8 1 4 15
22 7 6 5 16
21 20 19 18 17
THE PATTERN MOVES with a 1 increment in SPIRAL DIRECTION

--
Yours forever in Digital Paradise
uSmAn

-------------------------------------------------
I tried Linux 18 months ago.
I removed it the very next day
Jul 22 '05 #1
2 2202
* "Usman" <ga*****@hotmail.com> schriebt:

Can some one help me on this question , I studied a lot but still am unable
to do this
I need to print the following pattern using recursion in C++ , the end term
is ' n ' selected
by the user. I hope so someone can do this here.
Byes.
The PATTERN IS
. 10 11 12 13
. 9 2 3 14
23 8 1 4 15
22 7 6 5 16
21 20 19 18 17
THE PATTERN MOVES with a 1 increment in SPIRAL DIRECTION

Just apart from being off-topic in [comp.lang.c++], what's the deal
with the indentation of '9'?

I fail to see the indentation pattern.

This response cross-posted to [comp.programming], follow-up to there.

Jul 22 '05 #2
I don't know why you think posting the question again is going to
help. Why not go and look at my answer on comp.programming?

Regards,
Buster.
Jul 22 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Corky | last post by:
This works: db2 SELECT DISTINCT PROBLEM_OBJECTS.PROBLEM_ID FROM PROBLEM_OBJECTS INNER JOIN PROBLEMS ON PROBLEM_OBJECTS.PROBLEM_ID = PROBLEMS.PROBLEM_ID WHERE INTEGER(DAYS(CURRENT DATE) -...
2
by: sid1 | last post by:
hi i have devised the source code for generating spiral matrix in C++..its compiling properly but i run it it is giving some segmentation fault plz help me how shud i remove this error. thanx
2
by: MBeckford05 | last post by:
Hello There ! I would like help, in writing a Java program to output an Archimedean Spiral to the screen. I have read on the net what a Archiemedian Spiral is. But I'm not too familiar with...
3
by: MBeckford05 | last post by:
Hi Everyone, I am placed with a problem. How to write a program in Java to produce the Archimeadean Spiral. The progam should look like an Archimedean spiral on the screen. Any help in hoe to...
8
by: mail2sandeepnl | last post by:
Hi how to spirally access 2 d array, ex: for input array 1 2 3 4 5 6 7 8 9 10 11 12 output should be like : 1,2,3,4,8,12,11,10,9,5,6,7
4
by: sumuka | last post by:
Hello , Im doing a java project in java 1.5 version and i need to draw the spiral . The problem is the user has to draw a box or rectangle of any size on an image and the central point of that box...
1
by: sumuka | last post by:
Hello, Can Anybody tell me how to draw a simple spiral in java ? Thanks in anticipation,
1
by: sumuka | last post by:
Hello, I'm doing a java project in which I have a rectangle which is drawn by the user by dragging the mouse and hence the size of the rectangle can vary for each execution. Now i need to draw a...
4
Thekid
by: Thekid | last post by:
Hi, I'm not very good with javascript but I wanted to know if there was a simple way to change this code so instead of printing out the numbers & letters in a spiral on the page, it can be changed to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.