Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void punto1() throws Exception {
- PrintWriter out = new PrintWriter(new FileWriter("1.txt"));
- int max = 0;
- int cmx = 0;
- for (Matrice m : matrice) {
- for (int j = 0; j < m.mat.get(0).length; j++) {
- int s = 0;
- for (int i = 0; i < m.mat.size(); i++)
- s += m.mat.get(i)[j];
- if (s > max) {
- max = s;
- cmx = j + 1;
- }
- }
- }
- out.println("la colonna di somma massima รจ la " + cmx + "a colonna");
- out.close();
- }
Advertisement
Add Comment
Please, Sign In to add comment