Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class SumArray {
- public static void main(String[] args) {
- //Define & Initialization
- int mumbers[] = new int[] {196,10,6,40,44};
- int sum = 0;
- for(int i = 0 ; i <= 4 ; i ++){
- sum = sum + mumbers[i];
- }
- System.out.println("The sum of the numbers array is: " + sum);
- }
- }
Add Comment
Please, Sign In to add comment