生成新矩阵。 [英] Generate new matrix.

查看:83
本文介绍了生成新矩阵。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在C中使用回报


输入:

零大小矩阵(m和n)
$ b $数组的b坐标(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



将成为



2 2 2 3 4 5

2 1 2 3 4 5

2 2 2 3 4 5

3 3 3 3 4 5



我尝试了什么:



我还没有尝试任何东西,因为这一课仍然是新的,我不知道模式

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

推荐答案

我们不做你的HomeWork。

HomeWork不会测试你的技能恳求其他人做你的工作,它将帮助你的老师检查你对你所学课程的理解,以及你应用它们时遇到的问题。

你的任何失败都会帮助你的老师发现你的弱点并设定补救措施。

所以,试一试,重读你的课程并开始工作。如果您遇到特定问题,请显示您的代码并解释这个确切的问题,我们可能会提供帮助。



建议:拿一张纸试着去做手动,你的程序应该使用相同的程序。

Nota:我甚至没有看到递归的需要,一些嵌套循环可以做到这一点。
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.


这篇关于生成新矩阵。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆