skilletwaffles

Untitled

Dec 18th, 2014
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.14 KB | None | 0 0
  1. public double average(int[] data, int n)
  2. {
  3. double sum = 0;
  4. for(int loop = 0; loop<n; loop++)
  5. {
  6. sum += data[loop];
  7. }
  8. return sum/n;
  9. }
Advertisement
Add Comment
Please, Sign In to add comment