Click here to Skip to main content
16,020,811 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
USING RECURSION IN C

the input :
size of zeros matrix ( m and n)
coordinate of array (a,b)

ex:

4 6 1 1

0 0 0 0 0 0
0 1 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0

will become

2 2 2 3 4 5
2 1 2 3 4 5
2 2 2 3 4 5
3 3 3 3 4 5

What I have tried:

I didn't try anything yet, because this lesson is still new and I don't know the pattern
Posted
Updated 11-Nov-16 13:33pm

1 solution

We do not do your HomeWork.
HomeWork is not set to test your skills at begging other people to do your work, it is set to help your teacher to check your understanding of the courses you have taken and also the problems you have at applying them.
Any failure of you will help your teacher spot your weaknesses and set remedial actions.
So, give it a try, reread your lessons and start working. If you are stuck on a specific problem, show your code and explain this exact problem, we might help.

Advice: take a sheet of paper and try to do it by hand, your program should use the same procedure.
Nota: I do not even see the need for recursion, a few nested loops can do the trick.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900