Computer Science, asked by routsanghamitra676, 11 months ago

write a program to print the series 4,8,16,32.....n terms​

Answers

Answered by kavyasaxena106
2

Answer:

import java.util.*;

class xyz

{

public static void main (String args[])

{

Scanner sc = new scanner (System. in);

int n=sc.nextInt();

for (i=2;i<=n;i++)

{

int j=math.pow(2,i);

System.out.println(j);

}}}

Similar questions