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
In a word processor, Tariq chooses Options from the Tools menu and then selects the Track Changes tab. Which of the following ta
bearhunter [10]

Highlight Changes

Compare Documents

3 0
3 years ago
A direct-mapped cache holds 64KB of useful data (not including tag or control bits). Assuming that the block size is 32-byte and
Cerrena [4.2K]

Answer:

A) Number of bits for byte = 6 bits

B) number of bits for index = 17 bits

C) number of bits for tag = 15 bits

Explanation:

Given data :

cache size = 64 kB

block size = 32 -byte

block address = 32 -bit

number of blocks in cache memory  

cache size / block size = 64 kb / 32 b = 2^11 hence the number of blocks in cache memory = 11 bits = block offset

A) Number of bits for byte

log _{2} (6)^2 = 6  bits

B) number of bits for index

block offset + byte number

= 11 + 6 = 17 bits

c ) number of bits for tag

= 32 - number of bits for index

= 32 - 17 = 15 bits

5 0
2 years ago
The Beaufort Wind Scale is used to characterize the strength of winds. The scale uses integer values and goes from a force of 0,
TEA [102]

Answer:

ranforce = randi([0, 12]);

if (ranforce == 0)

     disp('There is no wind')

else  if(ranforce>0 && ranforce <7)

     disp('There is a breeze')

else  if(ranforce>6 && ranforce <10)

     disp('This is a gale')

else  if(ranforce>9 && ranforce <12)

     disp('It is a storm')

else  if(ranforce==12)

     disp('Hello, Hurricane!')

end

Explanation:

<em>Replace all switch case statements with if and else if statements.</em>

<em>An instance is:</em>

<em>case {7,8,9}</em>

<em>is replaced with</em>

<em>else  if(ranforce>9 && ranforce <12)</em>

<em>All other disp statements remain unchanged</em>

5 0
2 years ago
I don't know what to do for these two questions
Rainbow [258]
我沒有看到問題?如果您可以在此問題上發布問題,那將非常有幫助!
6 0
2 years ago
In 3–5 sentences, describe the unique challenges e-mail presents for business communications.
alina1380 [7]
One of the things that are a challenge, is that you have to get the correct puntuation, correct capitilization, because it's a buisness email. You ont want to mess a buisness email up. You also have to have no repating phrases and sentences. You can't be adding random words and saying "and" all the time. 
7 0
3 years ago
Read 2 more answers
Other questions:
  • For which task is the WordArt gallery most useful?
    15·2 answers
  • Samantha plans an investigation in which she will study a population of animals. Which of these answers best describes the focus
    8·1 answer
  • Write a program that prints the day number of the year, given the date in the form month-day-year. For example, if the input is
    9·1 answer
  • Identify traits of entrepreneurs. Check all of the boxes that apply.
    11·1 answer
  • Which of the following prefixes would be best to use when measuring your own mass?
    15·1 answer
  • How to improve a poor game design puzzles
    11·1 answer
  • The Electronic Age began in the<br> A. 1940s<br> B. 1970s<br> C. 1980s<br> D. 1990s
    11·2 answers
  • What are some limitations when it comes to testing and ensuring program quality? List at
    15·1 answer
  • Which option is an example of an algorithm that is used in daily life?
    8·1 answer
  • Question 12 (5 points)
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!