Created
June 30, 2012 19:09
-
-
Save daemonfire300/3025132 to your computer and use it in GitHub Desktop.
sdsdgsdg
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class matrixweteaddieren { | |
public static void main (String [] args) { | |
double [] [] m = { | |
{ 7.2, 4.3, 8.0, 3.3}, | |
{ 4.1, 5.0, 1.0, 9.0}, | |
{ 1.0, 3.0, 3.2, 2.4} }; | |
double sum = 0.0; | |
for (int i = 0; i < m.length; i++) | |
{ | |
for (int j = 0; j < m [j].length; j++) | |
{ | |
sum = sum + m[i] [j]; | |
} | |
} | |
System.out.println ("Summe der Matrixelemente:" + sum); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment