Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static double task36(double[][] a) {
- double sum = 0;
- int ind = -1;
- for (int i = 0; i < a[0].length; ++i) {
- double tmpSum = 0;
- for (int j = 0; j < a.length; ++j) {
- tmpSum += a[j][i];
- }
- if (tmpSum > sum) {
- sum = tmpSum;
- ind = i;
- }
- }
- System.out.println("Colomn with index " + ind + " have the biggest sum");
- return sum;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement