Consider the given 5-5 array of any integers and the line numbers shown in the figures Write a program to display the line numbers in ascending order based on the sum of the numbers in that line. If more than one line is having the same sum, then those line numbers must be in ascending order. For the given example the 5-5 elements are given inside the blue grids and red highlighted portion shows the sum of the elements in each line. The output for the given away is: (1.2.6.7. 3.8.11,129,10, 4.5). Note that, in this example line 11, 12, 3 and 8 are having the same sum 65, so these four are sorted as 3, 8, 11, 12 in the final answer. 2 7 12 12 17 22 3 3 4 9 14 14 19 24 S 9 6 11 16 21 13 13 18 23 15 15 20 25 +4 - 10 8
Answers
Answered by
2
Answer:
Consider the given 5-5 array of any integers and the line numbers shown in the figures Write a program to display the line numbers in ascending order based on the sum of the numbers in that line. If more than one line is having the same sum, then those line numbers must be in ascending order. For the given example the 5-5 elements are given inside the blue grids and red highlighted portion shows the sum of the elements in each line. The output for the given away is: (1.2.6.7. 3.8.11,129,10, 4.5). Note that, in this example line 11, 12, 3 and 8 are having the same sum 65, so these four are sorted as 3, 8, 11, 12 in the final answer. 2 7 12 12 17 22 3 3 4 9 14 14 19 24 S 9 6 11 16 21 13 13 18 23 15 15 20 25 +4 - 10 8
Similar questions
Math,
7 days ago
English,
7 days ago
Social Sciences,
15 days ago
Math,
15 days ago
Math,
8 months ago
English,
8 months ago
Computer Science,
8 months ago