DEV Community

Ilakkiya
Ilakkiya

Posted on

Puzzle Task:

program1:

public class Beat
{
public static void main(String args[])
{

int beat=1024;
int count=0;
while(beat>1)
{
beat=beat/2;
count=count+1;
}
System.out.println("total counts:" +count);
}
}

output=>total counts:10

program2:

public class Flower
{
public static void main(String args[])
{

int flower=1;
int count=1;
while(count<=7)
{
flower=flower*2;
count=count+1;
}
System.out.println("total flowers" +flower);
}
}

output=> total flowers:128

Top comments (0)

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more