Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class p04 {
- public static void main(String[] args) {
- Scanner console = new Scanner(System.in);
- int n = Integer.parseInt(console.nextLine());
- int currNum = 1;
- double power2 = Math.pow(2, n);
- while (currNum <= power2 ){
- System.out.println(currNum);
- currNum *= 4;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement