Advertisement
sindrijo

For loop that writes out numbers

Sep 4th, 2013
37
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.19 KB | None | 0 0
  1. public class program {
  2.  
  3.     public static void main(String[] args) {
  4.        
  5.         int x = 289;       
  6.         for(int i = 33; x > 80 ; i -= 2)
  7.         {
  8.             System.out.print(x + " ");
  9.             x -= i;
  10.         }
  11.        
  12.     }
  13.  
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement