×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Java
Posted by: Vasilii Vasilev
Added: May 2, 2014 10:33 AM
Views: 6
  1. int limit = 20, sum = 0, i = 1;
  2. while (i <= limit){
  3.     sum += i++;
  4.     System.out.println(sum);
  5. }