Guest User

Untitled

a guest
Oct 24th, 2017
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. public class SumArray {
  2.  
  3. public static void main(String[] args) {
  4.  
  5. //Define & Initialization
  6. int mumbers[] = new int[] {196,10,6,40,44};
  7.  
  8. int sum = 0;
  9.  
  10. for(int i = 0 ; i <= 4 ; i ++){
  11. sum = sum + mumbers[i];
  12. }
  13.  
  14. System.out.println("The sum of the numbers array is: " + sum);
  15. }
  16.  
  17. }
Add Comment
Please, Sign In to add comment