Advertisement
tchenkov

L07u04_EvenPowersOf2

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