void setup()
{
int input = getInt("Enter a positive integer");
int powerOfTwo = 0;
while(pow(2, powerOfTwo) < input)
powerOfTwo++;
println("The smallest power of two greater than or"
+ " equal to " + input + " is 2^" + powerOfTwo);
exit();
}
void setup()
{
int input = getInt("Enter an integer - zero to stop");
int previousInput = 0;
int consecutiveCounter = 0;
while(input != 0)
{
if (previousInput == input)
consecutiveCounter++;
previousInput = input;
input = getInt("Enter an integer - zero to stop");
}
println("There were " + consecutiveCounter + " equal consecutive values.");
exit();
}