Skip to content

Instantly share code, notes, and snippets.

@anjanashankar9
Last active July 15, 2020 13:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anjanashankar9/884f7f733b384a758dc74d279c8dcc0b to your computer and use it in GitHub Desktop.
Save anjanashankar9/884f7f733b384a758dc74d279c8dcc0b to your computer and use it in GitHub Desktop.
public int add(int[] arr) {
sum = 0;
for (int i=0; i<arr.length; i++) {
sum+=arr[i]
}
return sum;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment