Skip to content

Commit

Permalink
Create Sum.java
Browse files Browse the repository at this point in the history
  • Loading branch information
PrinzEugen7 committed Nov 26, 2015
1 parent d4038b5 commit 31c755b
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions Java/Basic/Sum.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import java.util.*;
import java.lang.*;
import java.io.*;

class Main
{
public static void main( String[] args ) {
int sum = 0;
int[] data = { 1, 2, 3, 4, 5};
for( int i=0; i<data.length; i++ ) {
sum += data[i];
}
System.out.println(sum);
}
}

0 comments on commit 31c755b

Please sign in to comment.