Advertisement
tchenkov

L07u03_PowersOfTwo

Feb 21st, 2017
287
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.41 KB | None | 0 0
  1. package Uprajneniq;
  2. import java.util.Scanner;
  3.  
  4. /**
  5.  * Created by todor on 20.02.2017 г..
  6.  */
  7. public class u03_PowersOfTwo {
  8.     public static void main(String[] args) {
  9.         Scanner scan = new Scanner(System.in);
  10.         int n = Integer.parseInt(scan.nextLine());
  11.         int num = 1;
  12.         for (int i = 0; i <= n; i++){
  13.             System.out.println(num);
  14.             num *= 2;
  15.         }
  16.     }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement