Advertisement
JoshJurban

Exercise 6.1A

Oct 23rd, 2014
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.28 KB | None | 0 0
  1. package chapterSix;
  2.  
  3. public class Variousloops
  4. {
  5.      public static void main(String[] args)
  6.      {
  7.          int EvenSum = 0;
  8.          for(int s=2; s <= 100; s = s +2)
  9.          {
  10.                  EvenSum =  EvenSum + s;  
  11.          }
  12.          System.out.println(EvenSum);
  13. }
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement