Math, asked by Ahmadharl8312, 1 year ago

Write a java program to generate the first n terms of the sequence without using multiplication. 1 2 4 8 16 32 ……….

Answers

Answered by Shubham111111999
3
class Sequence
{
//function to display sequence
void displaySequence()
{
int i;
for(i = 1 ; i<=n ; i=i+i )
{
System.out.println(i);
}
}
}
Similar questions