pavsavov

Aloops_U4

Feb 19th, 2017
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class u4 {
  4. public static void main(String[] args) {
  5. Scanner scanner = new Scanner(System.in);
  6. int n = Integer.parseInt(scanner.nextLine());
  7.  
  8. int num = 1;
  9. System.out.println(num);
  10.  
  11. for (int i = 1; i <= n; i++) {
  12. if (i % 2 == 0) {
  13. num = num * 2*2;
  14. System.out.println(num);
  15. }
  16. }
  17.  
  18. }
  19. }
Add Comment
Please, Sign In to add comment