Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

java summe array

int[] A = {1, 2, 3};
int sum = 0;
for(int i = 0; i < A.length; i++){
	sum += A[i];
}
System.out.prinln(sum);//Ausgabe wäre in dem Beispiel: 6
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #java #summe #array
ADD COMMENT
Topic
Name
7+1 =