Advertisement
JoshJurban

Exercise 6.2C

Oct 23rd, 2014
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.33 KB | None | 0 0
  1. package chapterSix;
  2.  
  3. public class IntegerReaders
  4. {
  5.     public static void main(String[] args)
  6.     {
  7.              int [] n = {3, 8, 4, 2};
  8.              int total = 0;
  9.              for(int i = 0; i<n.length; i++)
  10.              {
  11.              total += n[i];
  12.              System.out.print(total + "\t");
  13.              }
  14.        
  15.     }  
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement