# logic of 2D 4x5 Array program

#### uppi_777

Joined Feb 26, 2018
12
Could some one help me for the logic of 2D 4x5 Array program with efficient code
let us consider we have two families [(0,0), (0,1), (0,2), (1,2), (2,2)] and [(3,0), (4,0)]
for example if i give input (0,0) i must have the complete set of output [(0,0), (0,1), (0,2), (1,2), (2,2)]
same way if i give (0,1) or (0,2) or (1,2) or (2,2) i must have the complete set of output [(0,0), (0,1), (0,2), (1,2), (2,2)]
for the next family if i give input either (3,0) or (4,0) i must have the complete set of output [(3,0), (4,0)]

#### WBahn

Joined Mar 31, 2012
25,760
You haven't done a very good job yet of specifying your problem. Are you saying that you ask a user for input and if they type in "(0,2)" that you are to output "[(0,0), (0,1), (0,2), (1,2), (2,2)]"?

What if someone enters "0,0"?

What if someone enters "(2,3)"?

What if someone enters "fred"?

What metric is being used to evaluate whether the code is "efficient"?

What language is this program written in?

This sounds a lot like some kind of homework problem. Is it?

#### uppi_777

Joined Feb 26, 2018
12
You haven't done a very good job yet of specifying your problem. Are you saying that you ask a user for input and if they type in "(0,2)" that you are to output "[(0,0), (0,1), (0,2), (1,2), (2,2)]"?

What if someone enters "0,0"? if someone enters (0,0) i want [(0,0), (0,1), (0,2), (1,2), (2,2)]

What if someone enters "(2,3)"? 0

What if someone enters "fred"? 0

What metric is being used to evaluate whether the code is "efficient"?

What language is this program written in? C Program

This sounds a lot like some kind of homework problem. Is it? No we are doing some plantation field work can you help me with the help of code