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
weqwewe [10]
3 years ago
8

Given positive integer numInsects, write a while loop that prints that number doubled without reaching 200. Follow each number w

ith a space. After the loop, print a newline. Ex: If numInsects = 16, print:16 32 64 128 import java.util.Scanner;public class InsectGrowth {public static void main (String [] args) {int numInsects;Scanner scnr = new Scanner(System.in);numInsects = scnr.nextInt(); // Must be >= 1/* Your solution goes here */}}
Computers and Technology
1 answer:
True [87]3 years ago
5 0

Answer:

The below code is pasted in the place of "/*Your solution goes here */"

while(numInsects<200) // while loop

       {

            System.out.print(numInsects+" "); // print statement

            numInsects=numInsects*2; // operation to print double.

       }

Output:

  • If the user gives inputs 16 then the output is 16 32 64 128.
  • If the user gives inputs 25 then the output is 25 50 100.

Explanation:

  • The above code is in java language in which the code is pasted on the place of "Your solution" in the question then only it can work.
  • Then the program takes an input from the user and prints the double until the value of double is not 200 or greater than 200.
  • In the program, there is while loop which checks the value, that it is less than 200 or not. If the value is less the operation is performed otherwise it terminates.
You might be interested in
You have recently installed Windows Server 2019 Desktop Experience on a server. Your manager informs you that he needs to extens
Korolek [52]

To meet the manager requirement, you need to format the server, then after that install Server Core. This process is now followed by rebooting the server in the Server Core mode.

<h3>How do you install a Windows server?</h3>

Whenever you want to install Windows Server by using setup wizard settings, you have the choice of installing Server Core or Server with a graphical user interface known as the Desktop Experience installation method.

Since the GUI is not usually installed with Server Core; you control the server via the command line by using:

  • PowerShell,
  • The Server Configuration tool (SConfig), or
  • Remote methods. 

Now, if your manager informs you that he needs to extensively use the command line and PowerShell but not the use of graphical interface, the best way to meet the requirements are:

  • Format the server and install server core
  • Reboot the server in the Server Core mode

Learn more about Windows server installation here:

brainly.com/question/26175904

5 0
2 years ago
What's the smallest part of a computer
Murljashka [212]

Answer:

A byte

Explanation:

I just had that question on my quiz

7 0
3 years ago
Read 2 more answers
Most presentations use text: A. To maximize area and style. B. At a minimum. C. To draw attention to content. D. Without restrai
klemol [59]

The answer is most likely A.


Hope this Helped!


;D

4 0
3 years ago
Read 2 more answers
People often delete or read email based upon the subject line alone select one:
erica [24]
The statement people often delete or read email based upon the subject line alone select one is TRUE. Based on the subject or topic of the email, they will judge if it is worthy to be read or deleted.
5 0
3 years ago
Read 2 more answers
8.5 question 2 edhesive
dangina [55]

Answer:

Please check the attachment.

Explanation:

Please check the attachment for the program in python.

Download txt
5 0
3 years ago
Other questions:
  • A defined set of standards that computers must follow in order to communicate properly is known as a
    13·2 answers
  • How can you ensure you don't go over your budget?
    8·1 answer
  • If the Account Number field in a record always should display the three characters in the account number in uppercase, then the
    14·1 answer
  • What natural resource are available on the coast but not somewhereelse
    13·1 answer
  • "The ____________________ function is a logical function that returns a TRUE value if any of the logical conditions are true and
    14·1 answer
  • When planning a backup strategy, ideally one needs to prioritize important data and only back up what is absolutely necessary fo
    15·1 answer
  • A business traveler notices there is an extra connector between the keyboard and the computer, in a business center. She has mos
    12·1 answer
  • For this assignment, select one of the organizations with a prominent IT department from the Topic 1 assignment. Once identified
    11·1 answer
  • Why are free web based providers so popular?
    12·1 answer
  • Wearables, video playback and tracking devices can help athletes because
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!