1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
suter [353]
2 years ago
8

/*

Computers and Technology
1 answer:
Lera25 [3.4K]2 years ago
4 0

Answer:

The answer to this question can be given as:

Method:

public static void showTwos(int number)  //method definition.

{

method body.  

System.out.print(number + " = ");  //print number

while (number % 2 == 0)   //condition

{

System.out.print("2 * ");    //print message.

number = number / 2;

}

System.out.println(number);    //print value.

}

Explanation:

In the above method definition firstly, we declare the method showTwos() that name is already given in the question then we pass a variable number as a parameter in the method. In this first, we take input number from the user and pass into this method. In this method we use a while loop it is an entry control loop in this loop first we modules the number if it is equal to 0.Then we divide the number by 2 and in the last, we print the value.

You might be interested in
What is the function of a text box in Microsoft word?​
Lisa [10]
A text box is an object you can add to your document that lets you put and type text anywhere in your file. Text boxes can be useful for drawing attention to specific text and can also be helpful when you need to move text around in your document.
4 0
3 years ago
Which tools is used to bundle cables neatly inside and outside of a computer?​
Ugo [173]

Answer:

Cable Ties

Explanation:

6 0
3 years ago
What is the big-O performance estimate of the following function?
larisa [96]

Answer:

The time complexity of the code is O(log₇n).

Explanation:

The i is updated by 7*i.On each iteration i is multiplied by 7.So on finding the time complexity of the code given above it will come out to  be log base 7.

When we divide the input by 2 the time complexity is log base 2.

So on dividing it by 7 we get the time complexity of log base 7.

8 0
3 years ago
Read 2 more answers
In Python please.
SOVA2 [1]

Answer:

negatives = []

zeros = []

positives = []

while True:

   number = input("Enter a number: ")

   if number == "":

       break

   else:

       number = int(number)

       if number < 0:

           negatives.append(number)

       elif number == 0:

           zeros.append(number)

       else:

           positives.append(number)

for n in negatives:

   print(n)

for z in zeros:

   print(z)

for p in positives:

   print(p)

Explanation:

Initialize three lists to hold the numbers

Create a while loop that iterates until the user enters a blank line

Inside the loop:

If the number is smaller than 0, put it in the negatives list

If the number is 0, put it in the zeros list

Otherwise, put the number in the negatives list

When the while loop is done, create three for loops to print the numbers inside the lists

5 0
3 years ago
25 points select 3 options!!!!!!!!!!!!!!!!!!!!!!!!!
STALIN [3.7K]
A, B , and E sorry if I’m wrong
4 0
2 years ago
Other questions:
  • Candace opened an email from a person she didn't know and clicked on a pop-up in the email that installed a virus on her compute
    8·2 answers
  • You have been instructed to connect a computer to a group of hosts that have been segmented from the regular network. What kind
    7·1 answer
  • Which are the best examples of costs that should be considered when creating a project budget?
    11·1 answer
  • A _____ is a machine that changes information from one form into another.
    7·1 answer
  • A. True <br> b. False: variables represent storage locations in the computer's memory.
    13·1 answer
  • why does it not let me create a new account when i log out of this one and go to join now after i fill everything out it wont le
    11·1 answer
  • Many programmers today use a(n) _________, which is software that helps them build their computer programs. eula cad sdlc ide
    15·1 answer
  • Write a program that will find the smallest, largest, and average values in a collection of N numbers. Get the value of N before
    13·1 answer
  • Although “dog.jpg” and “dog.JPG” and “Dog.jpg” and “DOG.JPG” all appear to be the same file, they are not considered the same wh
    6·1 answer
  • What steps can you take to secure your private information?.
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!