Hey guys,I'm new,but I study C programming language and I have this awfull problem.
I have make a matrix A[n][n],in which n is an odd positive number(of course),and the matrix must "unwrap" itself with the number 1 in the middle then 2 to the top,then clockwise 3,4,5,..etc,until it wraps the numbers 1 and finishes with the n*n number at the upper left corner...
I've seen the algorithm for the spiral matrix which wraps itself from the outside in,mine is the absolute opposite...I need help fast on this one,if anyone has suggestions I would be very thankful!
Only C,haven't started C++ yet.
=Landoro=
Landoro 0 Newbie Poster
Recommended Answers
Jump to PostConcrats! Now that you have logic right, why not practise some commenting and/or changing the variable names descriptive?
Maybe also you could find little better indention standard as I find for example indention of the for loop lines 22-56 kind of "interesting" ;)
Jump to PostIt's best to state your question in a new thread for two reasons:
1) it's not the same as the original problem, and
2) it may not get the attention it deserves, here.
You can't use an array to hold the numbers? What CAN you use? No sense speculating about …
All 5 Replies
DeanMSands3 69 Junior Poster
Landoro 0 Newbie Poster
TrustyTony 888 ex-Moderator Team Colleague Featured Poster
Bchandaria 0 Newbie Poster
Adak 419 Nearly a Posting Virtuoso
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.