Computer Science, asked by teacher26, 3 months ago

Que-5.
Write the programs in Java to display the first ten terms of
the following series:
4.8. 16, 32..​

Answers

Answered by anindyaadhikari13
2

Question:-

  • Write a Java program to display the first 10 terms of the series. 4,8,16,32....

Program:-

class Java

{

public static void main()

{

int a=4, i;

for(i=1;i<=10;i++, a*=2)

System.out.print(a+" ");

}

}

Similar questions