Java Loops II

  • + 1 comment

    class Solution{ public static void main(String []argh){ Scanner in = new Scanner(System.in); int t=in.nextInt(); for(int i=0;i

            //x=x+(((int)Math.pow(2,i))*b);
             r=r+(((int) Math.pow(2,j))*b);
            System.out.print(r+" ");
           }
           System.out.println();
    
    
        }
        in.close();
    }
    

    }

    i have put down solution here check it