Home > Back-end >  A great god, just learning C language of the new, made from an array, the trouble to explain the gre
A great god, just learning C language of the new, made from an array, the trouble to explain the gre

Time:06-09

Have a, BC, d, e, a total of 5 different ball, ready to respectively among a YiBingDing e five children, known children don't have a ball, children don't b ball, children without the ball, c c write a c language program for how many different kinds of method,

CodePudding user response:

Tell you a logically the simplest way, take five balls of the five people all listed, then remove the do not conform to the requirements of
Give some tips on code, can use five figures show that the ball, in an array, and then an array said five people, through the array to the number of group assignment, if qualified, the species plus 1
It is not difficult to understand, also not bad

CodePudding user response:

1/f, reference and 蘤 old crepe response:
tell you the easiest way to do on a logical, take five five balls of all listed, then remove does not conform to the requirements of the
Give some tips on code, can use five figures show that the ball, in an array, and then an array said five people, through the array to the number of group assignment, if qualified, the species plus 1
It is not difficult to understand, implementations are not bad

I have already written a code, the feeling is not very concise, I also know,

CodePudding user response:

refer to the second floor weixin_45849403 response:
I have already written a code, feeling is not very simple, I also know,

That you make a 2 d array, list, says the ball, cannot use place is 0, then traverse

CodePudding user response:

This is math problem with programming problem, don't look down on your teacher, suggestion with pen and paper, temporarily shut down the computer,

CodePudding user response:


I hope it can help you: https://blog.csdn.net/it_xiangqiang/category_10581430.html
I hope it can help you: https://blog.csdn.net/it_xiangqiang/category_10768339.html
  • Related