Advertisement
Azazavr

выводящую на экран первые 20 элементов последовательности 2

Feb 21st, 2015
198
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.26 KB | None | 0 0
  1. /**
  2.  * Created by Azazavr on 21.02.2015.
  3.  */
  4. public class Test4 {
  5.     public static void main(String[] args) {
  6.         int a=1;
  7.         int b=1;
  8.        do{
  9.            a*=2;
  10.            System.out.println(a);
  11.            b++;
  12.        }while (b <= 20);
  13.     }
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement